什么是计算机视觉? What is Computer Vision?
当你早晨睁开眼睛,阳光从窗户照进来,你看到了妈妈准备好的早餐——金黄色的煎蛋、红色的草莓、白色的牛奶。多么美好的一天开始了!但是你有没有想过,这个看似简单的"看"的动作,实际上是大自然最神奇的杰作之一?当你睁开眼睛的那一刻,你的大脑就开始了一场复杂而精密的工作,数以亿计的神经细胞协同运作,在不到一秒钟的时间内完成了图像的接收、处理和理解。而今天,我们要探索一个令人着迷的问题:计算机是否也能像人类一样"看见"这个世界?
当我们谈论"看"的时候,我们究竟在做什么
To see or to look—that is the question that has puzzled philosophers and scientists for thousands of years. The act of seeing, which we perform effortlessly thousands of times each day, is actually one of the most complex processes in the known universe. When you look at your favorite toy, something extraordinary happens inside your head. Light bounces off the toy and enters your eyes through the cornea, the clear front surface of your eye. This light passes through your pupil, the dark opening in the center of your eye, and is focused by your lens onto the retina at the back of your eye.
当你看到最喜欢的玩具时,你的眼睛内部正在发生一件非凡的事情。光从玩具表面反射回来,穿过角膜——也就是眼睛前方透明的膜状结构——进入你的眼睛。这束光穿过瞳孔,也就是眼睛中央的黑色开口,然后被晶状体聚焦,投射到眼睛后部的视网膜上。视网膜上布满了数百万个光感受器细胞,它们就像 tiny cameras inside your eyes, each one capturing a tiny piece of the image in front of you. These photoreceptor cells come in two main types: cones, which help you see color and detail in bright light, and rods, which allow you to see in dim lighting and help you detect motion.
这些光感受器细胞就像你眼睛内部的小摄像头,每一个都在捕捉眼前图像的一小块碎片。这些感光细胞主要有两种类型:视锥细胞帮助你在明亮的光线下看清颜色和细节,而视杆细胞则让你在昏暗的环境中也能看见东西,同时帮助你检测运动。但是,仅仅是接收到光线还远远不够。真正的魔法发生在你的大脑中。
However, simply receiving light is not enough. The real magic happens in your brain. Once your retina captures the image, it converts it into electrical signals that travel along the optic nerve to your brain. Your brain then processes these signals through multiple complex stages. First, your primary visual cortex—a region at the back of your brain—receives the raw visual information. But this is just the beginning. Your brain then performs a series of incredibly sophisticated operations: it recognizes edges and shapes, identifies colors and textures, estimates distances and depths, and matches what you're seeing with memories of past experiences. Within a fraction of a second, you know exactly what you're looking at and can make decisions about how to respond.
一旦视网膜捕获到图像,它就会将其转换成电信号,通过视神经传递到大脑。然后你的大脑通过多个复杂阶段处理这些信号。首先,你的主要视觉皮层——大脑后部的一个区域——接收原始的视觉信息。但这仅仅是开始。然后你的大脑执行一系列极其复杂的操作:它识别边缘和形状,辨认颜色和纹理,估计距离和深度,并将你所看到的与过去经历的记忆相匹配。在不到一秒钟的时间内,你就确切地知道自己在看什么,并能决定如何做出反应。
人类视觉系统:自然界最精密的相机
The human eye is often compared to a camera, and this comparison helps us understand how our visual system works. Just like a camera, your eye has a lens that focuses light, an aperture that controls how much light enters, and a sensor (the retina) that captures the image. But unlike any camera ever made, your eye is self-repairing, self-cleaning, and can adapt to an incredible range of lighting conditions—from the dim glow of starlight to the brilliant blaze of noonday sun.
人类的眼睛经常被比作相机,这个比喻帮助我们理解视觉系统的工作原理。就像相机一样,你的眼睛有一个聚焦光线的晶状体,一个控制进入光线量的光圈,以及一个捕捉图像的传感器(也就是视网膜)。但与任何相机不同的是,你的眼睛能够自我修复、自我清洁,并且能够适应极其广泛的光照条件——从微弱的星光到正午的灿烂阳光。
让我们更详细地看看眼睛的各个组成部分:
眼球的基本结构
眼球近似于一个直径约24毫米的球形器官,这个大小大约相当于一颗中等大小的弹珠。眼球的结构可以分为几个主要部分:
角膜(Cornea)是眼球最前方的透明圆顶状结构,它占据了眼睛约三分之二的聚光能力。角膜没有血管,因此保持透明,这使得光线能够毫无阻碍地进入眼睛。
虹膜(Iris)是眼睛的有色部分,它环绕着瞳孔。虹膜中含有色素细胞,决定了眼睛的颜色——棕色、绿色、蓝色或灰色。虹膜的另一个重要作用是通过收缩和扩张来调节瞳孔的大小,从而控制进入眼睛的光线量。在明亮的环境中,虹膜会使瞳孔收缩,减少光线;在黑暗中,瞳孔会扩大,让更多光线进入。
晶状体(Lens)是眼睛内部的透明双凸透镜,由韧带悬挂并由睫状肌控制。不同于角膜的固定形状,晶状体可以通过改变形状来进行调节——当你看近处的物体时,晶状体会变厚变凸;看远处物体时,晶状体则会变薄变平。这种调节能力让我们能够清晰地看到不同距离的物体。
视网膜(Retina)是眼球内壁的一层薄膜,包含光感受器细胞。视网膜可以被看作是大脑的延伸,实际上它是大脑发育过程中向外突出形成的。视网膜上大约有1.2亿个视杆细胞和600万个视锥细胞,它们共同工作,将光信号转换为神经信号。
视觉信息的处理:从光到感知
The journey from light to visual perception is far more complex than simply capturing an image. Your brain doesn't just "see" what's in front of you—it actively interprets and makes sense of visual information based on your knowledge, expectations, and current goals. This process is so sophisticated that we often take it for granted, never pausing to appreciate the incredible computational power required.
从光线到视觉感知的旅程远比简单地捕捉图像复杂得多。你的大脑不仅仅是在"看到"面前的东西——它还根据你的知识、期望和当前目标积极地解释和理解视觉信息。这个过程是如此复杂,以至于我们经常认为这是理所当然的,从不停下来欣赏所需的惊人计算能力。
当光线到达视网膜时,光感受器细胞会将光信号转换为电化学信号。这些信号随后被视网膜中的其他神经元进行处理,包括水平细胞、双极细胞和无长突细胞,它们对信号进行初步的过滤和增强。接下来,神经节细胞将处理后的信号通过视神经传递到大脑。
视觉信息进入大脑后,会经过两条主要的通路。腹侧视觉通路(Ventral Stream)从初级视觉皮层向下延伸,经过颞叶,主要负责识别物体——它帮助你回答"这是什么"的问题。背侧视觉通路(Dorsal Stream)则从初级视觉皮层向上和向后延伸,经过顶叶,主要负责空间位置和运动——它帮助你回答"物体在哪里"以及"物体如何移动"的问题。
This dual-stream model of visual processing, first proposed by psychologists David Milner and Melvyn Goodale, helps explain why patients with certain brain injuries can perceive objects but cannot interact with them, or vice versa. It reveals that vision is not a single, unified process, but rather a collection of specialized abilities that work together seamlessly in the healthy brain.
这个双重通路的视觉处理模型由心理学家大卫·米尔纳和梅尔文·古德尔首先提出,它帮助解释了一些脑损伤患者为什么能够感知物体却无法与其互动,或者反过来。这个发现表明,视觉不是一个单一的、统一的过程,而是多种专业能力在健康大脑中无缝协作的集合。
计算机视觉的诞生:让机器学会"看"
Having explored the marvels of human vision, we now turn to an equally fascinating question: Can we teach machines to see? Computer vision is the field of study devoted to this very goal—a multidisciplinary science that seeks to enable computers to understand, interpret, and process visual information from the world around us. Just as human vision evolved over millions of years to help us survive and thrive in our environment, computer vision represents humanity's attempt to give our technological creations a similar gift: the ability to perceive and make sense of visual data.
在探索了人类视觉的奇妙之处后,我们现在转向一个同样令人着迷的问题:我们能否教机器"看"?计算机视觉正是致力于这一目标的研究领域——这是一门多学科科学,旨在使计算机能够理解、解释和处理来自周围世界的视觉信息。正如人类视觉经过数百万年的进化来帮助我们在环境中生存和发展一样,计算机视觉代表了人类试图赋予科技创造物类似能力的尝试:感知和理解视觉数据的能力。
计算机视觉的定义与范畴
计算机视觉(Computer Vision)是一门让计算机从图像或视频中获得高层次理解的人工智能分支。简单来说,它研究如何让机器能够"看懂"世界。从技术角度来看,计算机视觉涵盖了从原始像素数据中提取有意义信息的所有方法、算法和系统。
The scope of computer vision is remarkably broad. It includes, but is not limited to, the following areas: Image Classification involves teaching computers to categorize entire images into different classes—like determining whether a photo contains a cat or a dog. Object Detection goes a step further by locating and identifying multiple objects within an image, drawing bounding boxes around each one. Semantic Segmentation assigns a class label to each pixel in an image, essentially performing a detailed pixel-by-pixel understanding of the scene. Face Recognition identifies or verifies individuals based on their facial features. Motion Analysis tracks the movement of objects across frames in video sequences. And 3D Reconstruction creates three-dimensional models of scenes or objects from multiple two-dimensional images.
计算机视觉的范围非常广泛。它包括但不限于以下领域:图像分类教授计算机将整个图像分类到不同的类别中——比如判断一张照片包含的是猫还是狗。目标检测更进一步,在图像中定位和识别多个对象,为每个对象绘制边界框。语义分割为图像中的每个像素分配类别标签,实际上是对场景进行逐像素的详细理解。面部识别根据面部特征识别或验证个人身份。运动分析跟踪视频序列中对象在帧间的移动。三维重建从多个二维图像创建场景或对象的三维模型。
计算机视觉的历史发展
The history of computer vision is a story of human ambition, scientific breakthroughs, and technological advancement spanning more than half a century. Understanding this history helps us appreciate how far we've come and glimpse the exciting possibilities that lie ahead.
计算机视觉的历史是一段跨越半个多世纪的人类雄心、科学突破和科技进步的故事。了解这段历史帮助我们欣赏我们已经走了多远,并瞥见未来令人兴奋的可能性。
The field of computer vision began in the 1960s, when computers were still in their infancy and the idea of machines processing visual information seemed like pure science fiction. In 1966, a seminal summer project at the Massachusetts Institute of Technology (MIT) attempted to connect a camera to a computer and have the system describe what it saw. This project, led by Marvin Minsky—who would later become one of the founding fathers of artificial intelligence—was remarkably ambitious for its time. The goal was to have a computer identify objects in a complex scene within a week. While this ambitious target was never achieved in that timeframe, the project planted the seeds for a new field