|
Prev: textscan function
Next: looping over filenames
From: Dave Tarkowski on 19 Jun 2008 10:43 Deven wrote: > Here is the problem I am facing regarding a vision system I ahve > designed. > > -------------------------------------- > Goal: Using a Firewire (Dcam compliant) CCD camera and lens system to > view live images of circles marked on an aluminum plate. Grab the > images and then process to find the center of the circle. > > Before I take a snapshot of the view, I want to look at the monitor to > check that its is a sharp image and then press enter to get a > snapshot. > > Problem here is that as soon as the program is run and a view window > is opened the image disappears in 2-3 seconds and all I can see is a > very very light image. The image keeps on emerging for a second every > 30 seconds or even longer. This hide and seek continues. But anytime I > use 'getsnapshot', it does give an image and saves it too. > > This inability to view live image does not let me focus the vision > system. > > Here is the code I am using for acuiring images and saving images. > > ------------------------------- > clc > clear all > > %% > imaqInfo = imaqhwinfo; > > imaqInfo.InstalledAdaptors; > > hwInfo = imaqhwinfo('dcam'); > > % Set acquisition object > > vidobj = videoinput('dcam'); % Provides summary of video input object > preview(vidobj) > vidobj.FrameGrabInterval = 10 > > %% > > % Pause for 10 seconds > pause(10) > > %Acquire a Frame > snapshot = getsnapshot(vidobj); > > %Display the frame in a figure window. > imagesc(snapshot) > colormap(gray) > axis off > > saveas(gcf,'testfig','jpeg') > > ----------------------------------------------------- > Also, is it possible to process an image when we are viewing it live > in the view window. > ------------------------------- > Thanks > Deven Deven, I'm a bit confused by your problem description. First, what version of MATLAB are you using and what camera are you using? Second, let me try to make sure that I understand the issue that you are seeing. What happens if you execute just the following commands: vidobj = videoinput('dcam'); preview(vidobj); If I understand your description properly, the image displayed in the preview window is a very light image. Does the preview window continue to update (i.e. does the timestamp at the bottom of the image update regularly)? What happens if you cover the lens of the camera and then uncover it? -Dave Tarkowski
From: Deven on 19 Jun 2008 14:20 On Jun 19, 10:43 am, Dave Tarkowski <dtark...(a)mathworks.com> wrote: > Deven wrote: > > Here is the problem I am facing regarding a vision system I ahve > > designed. > > > -------------------------------------- > > Goal: Using a Firewire (Dcam compliant) CCD camera and lens system to > > view live images of circles marked on an aluminum plate. Grab the > > images and then process to find the center of the circle. > > > Before I take a snapshot of the view, I want to look at the monitor to > > check that its is a sharp image and then press enter to get a > > snapshot. > > > Problem here is that as soon as the program is run and a view window > > is opened the image disappears in 2-3 seconds and all I can see is a > > very very light image. The image keeps on emerging for a second every > > 30 seconds or even longer. This hide and seek continues. But anytime I > > use 'getsnapshot', it does give an image and saves it too. > > > This inability to view live image does not let me focus the vision > > system. > > > Here is the code I am using for acuiring images and saving images. > > > ------------------------------- > > clc > > clear all > > > %% > > imaqInfo = imaqhwinfo; > > > imaqInfo.InstalledAdaptors; > > > hwInfo = imaqhwinfo('dcam'); > > > % Set acquisition object > > > vidobj = videoinput('dcam'); % Provides summary of video input object > > preview(vidobj) > > vidobj.FrameGrabInterval = 10 > > > %% > > > % Pause for 10 seconds > > pause(10) > > > %Acquire a Frame > > snapshot = getsnapshot(vidobj); > > > %Display the frame in a figure window. > > imagesc(snapshot) > > colormap(gray) > > axis off > > > saveas(gcf,'testfig','jpeg') > > > ----------------------------------------------------- > > Also, is it possible to process an image when we are viewing it live > > in the view window. > > ------------------------------- > > Thanks > > Deven > > Deven, > > I'm a bit confused by your problem description. First, what version of > MATLAB are you using and what camera are you using? Second, let me try > to make sure that I understand the issue that you are seeing. What > happens if you execute just the following commands: > > vidobj = videoinput('dcam'); > preview(vidobj); > > If I understand your description properly, the image displayed in the > preview window is a very light image. Does the preview window continue > to update (i.e. does the timestamp at the bottom of the image update > regularly)? What happens if you cover the lens of the camera and then > uncover it? > > -Dave Tarkowski- Hide quoted text - > > - Show quoted text - Hello Dave, I appreciate your support. Please find my answers as under: Version of Matlab: R2007b Camera: Prosilica EC 1600. Its a fire wire camera, IIDC 1394 - based digital camera specification 1.31. What happens when I execute: vidobj = videoinput('dcam'); preview(vidobj); The preview window opens, it shows whatever is in the view. Within 2-3 seconds the image starts brightening to an extent that I only see those areas of the image which are relatively dark. Others just fade away and all becomes white in a few seconds. Does the preview window continue to update (i.e. does the timestamp at the bottom of the image update regularly)? Yes, the preview window continues to update regularly. Also, at the bottom, the preview window states: Waiting for START. What happens if you cover the lens of the camera and then uncover it? The same. The preview window opens, it shows whatever is in the view. Within 2-3 seconds the image starts brightening to an extent that I only see those areas of the image which are relatively dark. Others just fade away and all becomes white in a few seconds. Plesae note: The snapshot is fine but the live preview is what I am unable to see continously. It just fades in afew seconds.
|
Pages: 1 Prev: textscan function Next: looping over filenames |