LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real time image crop

I've got a problem with the image extract 2 vi. It works perfectly with Get Image.vi, when I want to crop an image, but it does not work after the Grab.vi when i want to crop a real time image, a video.

 

What is the best method to crop a real-time image from a webcam. (This webcam does not allow to crop the image within the MAX).

 

Thanks for the replies,

0 Kudos
Message 1 of 3
(3,327 Views)

You should always attach your code so we can understand what you mean.  Among other things, it would tell us the Version of LabVIEW you are using (the IMAQdx functions changed a few years back).

 

You say that Image Extract 2 works with "Get Image".  Do you mean "IMAQdx Get Image 2"?  One difference between this function and IMAQdx Grab2 is that Grab returns the latest image, while Get Image returns a "specified" (in the past) Image.  Other than that, the Images are the same and whatever processing you are doing shouldn't be any different.

 

What do you mean by "Real Time Image"?  If you are running a WebCam, there is no "Real Time".  Do you mean "process video images as they arrive, on-the-fly"?

 

You know, don't you, that Image Extract 2 not only can "crop" an Image but can also alter the resolution (by discarding rows and columns of pixels).  Or did you mean the low-level function Image Extract?  [If we saw the code, it would be obvious ...].

 

Bob Schor

0 Kudos
Message 2 of 3
(3,290 Views)

Along with Bob's suggestion to post your code, I'll mention this. I usually use Point Grey cameras, so I don't know if the resolution on your webcam can be modified. But, what I do is let the user draw an ROI, and then use that rectangle to determine the height, width, left offset, and top offset. The nice thing about dropping the resolution (rather than cutting off a border in the software) is that it generally gives you higher frame rates.

0 Kudos
Message 3 of 3
(3,267 Views)