什么是still imagepci device是什么接口

监控用CMOS与CCD图像传感器技术对比
> 监控用CMOS与CCD图像传感器技术对比
监控用CMOS与CCD图像传感器技术对比
  (Charge Coupled Device)(以下简称)和( Image Sensor以下简称)的主要区别是由感光单元及读出电路结构不同而导致制造工艺的不同。感光单元实现光电转换后,以电荷的方式存贮并以电荷转移的方式顺序输出,需要专用的工艺制程实现;图像感光单元为光电二极管,可在通用集成电路工艺制程中实现,除此之外还可将图像处理电路集成,实现更高的集成度和更低的功耗。  目前CCD几乎被日系厂商垄断,只有少数几个厂商例如索尼、夏普、松下、富士、东芝等掌握这种技术。是90年代兴起的新技术,掌握该技术的公司较多,美国有OmniVision,Aptina;欧洲有ST;韩国的三星,SiliconFile,Hynix等;日本的SONY,东芝等;中国台湾的晶像;大陆地区的比亚迪,格科微等公司。由于CCD技术出现早,相对成熟,前期占据了绝大部分的高端市场。早期CIS与CCD相比,仅功耗与成本优势明显,因此多用于手机,PC Camera等便携产品。随着CIS技术的不断进步,性能不断提升;而CCD技术提升空间有限,进步缓慢。目前CIS不仅占据几乎全部的便携设备市场,部分高端DSC(Digital Still Camera)市场,更是向CCD传统优势市场——监控市场发起冲击。下面就监控专用CIS与传统CCD进行综合对比。一、灵敏度(Responsivity)  作为最重要的技术指标之一,灵敏度是衡量图像传感器对于光线的敏感程度。监控专用CIS的灵敏度高达10V/Lux-sec以上,高过大部分的CCD传感器(Sharp RJ2311C灵敏度为3.2V/ Lux-sec)。灵敏度指标主要体现在画质的亮度和低光效果上,灵敏度越高画面越清晰。虽然CIS的最小感光度(Minimum Detectable Light)指标低于CCD,但可以满足绝大部分监控应用场合。二、动态范围(Dynamic Range)  动态范围是衡量图像传感器对于明暗光线差别较大的场景下的表现。在实际应用中,体现在图像传感器是否可以在一幅图像中既可以清晰显示较暗的场景,又可以清晰显示光线充足的场景。尤其是当Camera对准窗口时,既要能看到窗内的景象,又要能看到窗外的场景,而不出现“过曝”现象。动态范围越高,表明在明暗差别较大的场景下,图像传感器表现越好。目前高端CIS可实现高达100dB以上的动态范围,而常见CCD的动态范围基本在60dB左右。从动态范围上讲,CIS略胜一筹。三、集成度(Integration)  由于CIS在标准CMOS工艺制程下制造,可将读出电路(包含相关双采样CDS,自动增益放大器AGC等),模数转换电路(ADC),图像信号处理(ISP),电视信号编码电路(TV-Encoder)等全部集成于单芯片中。而CCD由于制造工艺特殊且复杂,处理电路需单独存在,配套使用,因此在应用上有“CCD套片”的叫法。“CCD套片”包含CCD图像传感器,V-Driver(时序控制/CCD多路电源,逐步被集成与CDS/AGC电路中),CDS/AGC(对应于CIS的读出电路),DSP(对应于CIS的ISP)四部分。如果采用CIS设计CCTV Camera方案,只需要一颗芯片,一颗LDO和少量阻容元件,全部设计可在一块两面SMD 32mm*32mm的PCB板上完成;如果采用CCD套片,则最少需要一块两面SMD 38mm*38mm的PCB板才能容纳所有器件。通常采用两块PCB板,以避免由PCB板元件过密带来的噪声问题。显而易见,基于CIS的Camera方案提供了更高的集成度,无论是PCB板设计难度,还是功耗/成本都大大下降。四、画质(Picture Quality)  除受图像传感器本身的物理特性影响外,图像信号处理技术从某种程度上决定了图像质量。之所以人们认为CIS效果不如CCD,一方面是由于长期以来形成的思维定势,更主要是因为CCD拥有独立的DSP,具有强大的图像处理功能,实际上图像传感物理部分已无差别。随着CIS内置ISP算法的不断进步,CIS画质已大幅提升。正常光线下,CIS与CCD画质已无差别,甚至已超越中低端CCD画质。但CIS的ISP集成在芯片内部,其性能与独立的DSP尚有差距,也造就了短期内CIS尚无法达到高端CCD的效果。五、工作温度(Operating Temperature)  目前CIS已被广泛应用于汽车监控(含可视倒车等),由于汽车电子的苛刻要求,用于汽车监控的CIS产品要求在-40℃-105℃正常工作。而CCD由于传感器部件对热敏感,高于60℃将无法正常工作(低于-20℃也无法正常工作),因此高端摄像机都需内置散热系统。相对而言,基于CIS的Camera设计将更加简单,稳定。六、接口(Interface)  由于CIS集成度优势,使得CIS相比于CCD拥有更丰富的接口种类。目前监控用CIS不仅能够输出RGB,YUV,CCIR656等数字信号,而且可以输出PAL/NTSC制式的模拟电视信号,既满足传统的CCTV应用,也能满足诸如IP Camera等数字应用。此外CIS还提供I2C控制接口,便于外部MCU对CIS的控制。CCD图像传感器本身只能输出模拟电信号,如果要增加各种接口,就需要“套片”配合使用。  比亚迪监控专用CIS产品在现有接口基础上,创新性提供了Master I2C接口和模拟差分电视信号接口。Master I2C接口使客户将调试最佳图像效果参数存于I2C 接口EEROM中,等CIS上电则读取EEROM中的参数并自行配置到最佳效果。针对越来越多的客户采用非屏蔽双绞线传输模拟视频信号,比亚迪CIS提供了差分输出接口,无须外接Balun。
双绞线传输器相关文章:
分享给小伙伴们:
我来说两句……
最新技术贴
微信公众号二
微信公众号一1773人阅读
AVCaptureDevice.
系统通过AVCaptureDevice来得到和管理设备的输入捕获设备,比如camara和麦克风,对于手机来说有2个carama(前后)和一个麦克风。
如果要设置某个设备的属性,那么在设置之前必须要调用
(BOOL)lockForConfiguration:(NSError**)outE
来进行锁定,然后进行属性设置,设置后调用
void)unlockForC
来取消锁定,这样做的目的是保证某个时间只有一个设备来进行属性设置。
对于carama设备里面支持一个手电筒的功能。
//是否有手电筒
@property(nonatomic,readonly)BOOLhasT
//手电筒是否有效,如果过热时系统会无效。
(nonatomic,readonly,getter=isTorchAvailable)BOOLtorchAvailable
NS_AVAILABLE_IOS(5_0);
//手电筒是否是亮的
(nonatomic,readonly,getter=isTorchActive)BOOLtorchActive
NS_AVAILABLE_IOS(6_0);
//手电筒亮的级别,从0-1
(nonatomic,readonly)floattorchLevel
NS_AVAILABLE_IOS(5_0);
//是否支持某种模式。
BOOL)isTorchModeSupported:(AVCaptureTorchMode)torchM
//设置模式是开电筒还是关还是自动。
(nonatomic)AVCaptureTorchModetorchM
//设置电筒开时的亮度级别,如果系统过热时可能会失败。
BOOL)setTorchModeOnWithLevel:(float)torchLevelerror:(NSError
**)outError NS_AVAILABLE_IOS(6_0);
对于carama还有其他的属性,比如闪光等,焦距,白平衡,底亮度增强等的设置。还支持捕捉的设备的移动通知,一旦通过
@property(nonatomic,getter=isSubjectAreaChangeMonitoringEnabled)BOOLsubjectAreaChangeMonitoringEnabled
NS_AVAILABLE_IOS(5_0);
设置可以监控是否移动,一旦有移动则会接收到AVCaptureDeviceSubjectAreaDidChangeNotification的通知。
一次会话用来建立输出和输入的连接AVCaptureSession。一个会话可以有多个输入和多个输出,输出和输入之间通过AVCaptureConnection来建立连接。一个AVCaptureConnection用来描述多个AVCaptureInputPort和一个AVCaptureOutput或者AVCaptureVideoPreviewLayer的关联(注意一个AVCaptureOutput可以有多个AVCaptureConnection),也就是说AVCaptureConneciton可以不关联输出。在IOS中用户不能建立AVCaptureConnection来关联输入和输出,而是系统内部来建立的Connection.而是用户直接调用Session的AddInput,AddOutput来指定输入和输出。
为什么要对AVCaptueInput做抽象,个人认为是因为输入不仅仅是设备还有可能是屏幕也算是一种输入,所以这里建立一个输入的抽象类,而具体的派生类则有AVCaptureDeviceInput代表设备输入源,而AVCaptureScreenInput则是代表屏幕输入源,对于设备输入源来说他的建立是通过AVCaptureDevice来建立的。而为什么要有AVCaptureInputPort则是因为AVCaptureInput描述一个整体的输入源,比如carama,而其实carama既能接收视频也能接收音频数据,所以有两个输入AVCaptureInputPort。
AVCaptureSession类。
//AVCaptureInput集合
@property(nonatomic,readonly)
//添加输入
(void)addInput:(*)input
//判断是否能添加输入
-(BOOL)canAddInput:(*)input
//添加输出,可以没有输出。这个函数内部估计在调用addOutput时内部会建立AVCaptureConnection来跟input建立关联。
(void)addOutput:(*)output
//是否能添加输出。
(BOOL)canAddOutput:(*)output
(void)removeInput:(*)input
(void)removeOutput:(*)output
//是否当前被终止捕获,可以通过KVO来监控这个属性。
@property(nonatomic,readonly, getter=isInterrupted) BOOL interrupted
//AVCaptureOutput的集合,这个可以是空如果是使用预览Layer的话。
@property(nonatomic,readonly)
//判断当前是否在运行,KVO
@property(nonatomic,readonly, getter=isRunning) BOOL running
//开始和结束会话
(void)startRunning
-(void)stopRunning
//进行会话的预设,比如捕获视屏的尺寸啊,质量等等。
@property(nonatomic,copy)
*sessionPreset
//判断是否某个属性能够设置。
(BOOL)canSetSessionPreset:(*)preset
//开始配置和结束配置,比如添加输入输出,设置预设值,都在这个之间设置会提升性能以及保持原子性。
(void)beginConfiguration
-(void)commitConfiguration
AVCaptureConnection
这个类是用来连接输入和输出的,在IOS中不能建立,只能设置其中的属性,而这个实例是从AVCaptureVideoPreviewLayer或者AVCaptureOutput中获得,
@property(nonatomic,getter=isEnabled) BOOL enabled
@property(nonatomic,readonly, getter=isActive) BOOL active
//输入的端口数组
@property(nonatomic,readonly)
*inputPorts
@property(nonatomic,readonly)
@property&(nonatomic,readonly)&AVCaptureVideoPreviewLayer&*videoPreviewLayer
//下面是设置视频的方向,捕获的帧的间隔时间
&&videoOrientation&&property
&&property
&&property
&&property
&&property
&&property
&&property
&&property
AVCaptureInput。
//得到所有输入端口
(nonatomic,readonly)NSArray*
输入现在有AVCaptureDeviceInput和AVCaptureScreenInput。具体参考类的实现。
AVCaptureInputPort是具体的端口类。方法参考类的定义。
AVCaptureOutput一共有如下派生类的输出:
//音频数据输出
AVCaptureAudioDataOutput
AVCaptureFileOutput,AVCaptureMovieFileOutput文件以及电影文件的输出后者是派生类
AVCaptureStillImageOutput//图片输出
//可以设置输出的图片的属性,这些属性只是下面可以支持的类型中设置。
@property(nonatomic,copy)
NSDictionary*outputS
(nonatomic,readonly)NSArray*availableImageDataCVPixelFormatT
(nonatomic,readonly)NSArray*availableImageDataCodecT
//执行拍照功能,注意block可能不是运行在主线程中。
(void)captureStillImageAsynchronouslyFromConnection:(AVCaptureConnection*)connection
completionHandler:(void(^)(CMSampleBufferRefimageDataSampleBuffer,
NSError*error))
NSData*)jpegStillImageNSDataRepresentation:(CMSampleBufferRef)jpegSampleB
//视频数据输出。
AVCaptureVideoDataOutput
这个类通过一个委托来实现采集数据
(void)setSampleBufferDelegate:(id&AVCaptureVideoDataOutputSampleBufferDelegate&)sampleBufferDelegatequeue:(dispatch_queue_t)sampleBufferCallbackQ
一副图像数据根据不同的色彩模型可以不同编码。比如RGBA,YCbCr,YUV等。也就是说每一个像素可以通过不同的色彩模型表示,这里需要介绍面的概念,所谓面是存储这些像素点时是将各色彩模型中的分量分别存储还是统一存储。如果是统一存储则只有1面,而分别单独的存储则称为有多面。
(void)captureOutput:(AVCaptureOutput*)captureOutputdidOutputSampleBuffer:(CMSampleBufferRef)sampleBufferfromConnection:(AVCaptureConnection*)
协议的回调函数CMSampleBufferRef制定监控的视频帧的样本采集缓存数据。
其中可以通过函数
CVImageBufferRefimageBuffer =CMSampleBufferGetImageBuffer(sampleBuffer);来得到其中的图片采集部分,CVImageBufferRef是专门用于保存视频的图片帧缓存的数据结构。这个数据结构有可能是描述OPENGL的帧信息也可能是描述像素表示的帧信息,如果是像素表示的帧信息则是一个
typedefCVImageBufferRef CVPixelBufferR
至于如何描述一个像素的色彩信息就可以参考上面所使用的颜色模型。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:45523次
排名:千里之外
原创:35篇
评论:46条
(1)(1)(1)(1)(1)(1)(2)(1)(1)(1)(24)3978人阅读
& & & 最近需要去研究一些关于调用系统摄像头拍照的东西,不用UIImageViewController,而使用AVCamCaptureManager and AVCamRecorder 类,现贴出部分的重要代码,整理和记录这方面的东西。
调用摄像头界面
- (void)setupAVCapture
& & //-- Create CVOpenGLESTextureCacheRef for optimal CVImageBufferRef to GLES texture conversion.
& & CVReturn err =CVOpenGLESTextureCacheCreate(kCFAllocatorDefault,NULL, (__bridgevoid
*)_context,NULL, &_videoTextureCache);
& & if (err)&
& & & & NSLog(@&Error at CVOpenGLESTextureCacheCreate %d&, err);
& & & & return;
& & //-- Setup Capture Session.
& & _session = [[AVCaptureSessionalloc]
& & [_session beginConfiguration];
& & //-- Set preset session size.
& & [_session setSessionPreset:_sessionPreset];
& & //-- Creata a video device and input from that Device.& Add the input to the capture session.
& & AVCaptureDevice * videoDevice = [AVCaptureDevicedefaultDeviceWithMediaType:AVMediaTypeVideo];
& & if(videoDevice == nil)
& & & & assert(0);
& & //-- Add the device to the session.
& & NSError * & & & &
& & AVCaptureDeviceInput *input = [AVCaptureDeviceInputdeviceInputWithDevice:videoDeviceerror:&error];
& & if(error)
& & & & assert(0);
& & [_session addInput:input];
& & //-- Create the output for the capture session.
& & AVCaptureVideoDataOutput * dataOutput = [[AVCaptureVideoDataOutputalloc]
& & [dataOutput setAlwaysDiscardsLateVideoFrames:YES];// Probably want to set this to NO when recording
& & //-- Set to YUV420.
& & [dataOutput setVideoSettings:[NSDictionarydictionaryWithObject:[NSNumbernumberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange]&
&& & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
forKey:(id)kCVPixelBufferPixelFormatTypeKey]];// Necessary for manual preview
& & // Set dispatch to be on the main thread so OpenGL can do things with the data
& & [dataOutput setSampleBufferDelegate:selfqueue:dispatch_get_main_queue()]; & & & &
& & [_session addOutput:dataOutput];
& & [_session commitConfiguration];
& & [_session startRunning];
- (void) captureStillImage
& & AVCaptureConnection *stillImageConnection = [AVCamUtilitiesconnectionWithMediaType:AVMediaTypeVideofromConnections:[[selfstillImageOutput]
connections]];
& & if ([stillImageConnection
isVideoOrientationSupported])
& & & & [stillImageConnection setVideoOrientation:orientation];
& & [[selfstillImageOutput]
captureStillImageAsynchronouslyFromConnection:stillImageConnection
&& & & & & & & & & & & & & & & & & & & & & & & & & & & &
completionHandler:^(CMSampleBufferRef imageDataSampleBuffer,NSError *error) {
ALAssetsLibraryWriteImageCompletionBlock
completionBlock = ^(NSURL *assetURL, NSError *error) {
if (error)
&& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &if ([[self
delegate]respondsToSelector:@selector(captureManager:didFailWithError:)]) {
&& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & [[selfdelegate]
captureManager:selfdidFailWithError:error];
&& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & }
if (imageDataSampleBuffer
!= NULL) {
NSData *imageData
= [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];
ALAssetsLibrary
*library = [[ALAssetsLibrary alloc]init];
&& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
UIImage *image = [[UIImage alloc]initWithData:imageData];
[librarywriteImageToSavedPhotosAlbum:[image
&orientation:(ALAssetOrientation)[imageimageOrientation]
&completionBlock:completionBlock];
[imagerelease];
[libraryrelease];
completionBlock(nil,
if ([[selfdelegate]
respondsToSelector:@selector(captureManagerStillImageCaptured:)]) {
[[selfdelegate]
captureManagerStillImageCaptured:self];
&& & & & & & & & & & & & & & & & & & & & & & & & & & & & }];
自动聚焦和连续聚焦:
- (void) autoFocusAtPoint:(CGPoint)point
& & AVCaptureDevice *device = [[self
videoInput] device];
& & if ([device
isFocusPointOfInterestSupported] && [device isFocusModeSupported:AVCaptureFocusModeAutoFocus]) {
& & & & NSError *
& & & & if ([device lockForConfiguration:&error]) {
& & & & & & [device setFocusPointOfInterest:point];
& & & & & & [device setFocusMode:AVCaptureFocusModeAutoFocus];
& & & & & & [device unlockForConfiguration];
& & & & } else {
& & & & & & if ([[self
delegate] respondsToSelector:@selector(captureManager:didFailWithError:)]) {
& & & & & & & & [[self
delegate] captureManager:self
didFailWithError:error];
& & & & & & }
& & & & } & & & &
// Switch to continuous auto focus mode at the specified point
- (void) continuousFocusAtPoint:(CGPoint)point
& & AVCaptureDevice *device = [[self
videoInput] device];
& & if ([device
isFocusPointOfInterestSupported] && [device isFocusModeSupported:AVCaptureFocusModeContinuousAutoFocus]) {
if ([device
lockForConfiguration:&error]) {
setFocusPointOfInterest:point];
setFocusMode:AVCaptureFocusModeContinuousAutoFocus];
unlockForConfiguration];
if ([[self
delegate] respondsToSelector:@selector(captureManager:didFailWithError:)]) {
& & & & & & & & [[self
delegate] captureManager:self
didFailWithError:error];
转换前置后置摄像头
- (BOOL) toggleCamera
& & BOOL success = NO;
& & if ([self
cameraCount] & 1) {
& & & & NSError *
& & & & AVCaptureDeviceInput *newVideoI
& & & & AVCaptureDevicePosition position = [[videoInput
device] position];
& & & & if (position ==
AVCaptureDevicePositionBack)
& & & & & & newVideoInput = [[AVCaptureDeviceInput
alloc] initWithDevice:[self
frontFacingCamera] error:&error];
& & & & else
if (position == AVCaptureDevicePositionFront)
& & & & & & newVideoInput = [[AVCaptureDeviceInput
alloc] initWithDevice:[self
backFacingCamera] error:&error];
& & & & else
& & & & & & goto
& & & & if (newVideoInput !=
& & & & & & [[self
session] beginConfiguration];
& & & & & & [[self
session] removeInput:[self
videoInput]];
& & & & & & if ([[self
session] canAddInput:newVideoInput]) {
& & & & & & & & [[self session]
addInput:newVideoInput];
& & & & & & & & [self setVideoInput:newVideoInput];
& & & & & & } else {
& & & & & & & & [[self session]
addInput:[self videoInput]];
& & & & & & }
& & & & & & [[self
session] commitConfiguration];
& & & & & & success = YES;
& & & & & & [newVideoInput release];
& & & & } else if (error) {
& & & & & & if ([[self
delegate] respondsToSelector:@selector(captureManager:didFailWithError:)]) {
& & & & & & & & [[self
delegate] captureManager:self
didFailWithError:error];
& & & & & & }
& & return
AVCamUtilities .m&
+ (AVCaptureConnection *)connectionWithMediaType:(NSString *)mediaType fromConnections:(NSArray *)connections
for ( AVCaptureConnection *connectionin connections ) {
AVCaptureInputPort *port in [connection
inputPorts] ) {
if ( [[portmediaType]
isEqual:mediaType] ) {
return nil;
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:134194次
积分:1720
积分:1720
排名:第16038名
原创:24篇
转载:63篇
评论:19条
(2)(3)(1)(3)(1)(1)(2)(1)(6)(1)(2)(4)(8)(5)(5)(11)(16)(16)

我要回帖

更多关于 still什么意思 的文章

 

随机推荐