Code covered by the BSD License  

Highlights from
Line value GUI

4.66667

4.7 | 3 ratings Rate this file 6 Downloads (last 30 days) File Size: 6.66 KB File ID: #5118
image thumbnail

Line value GUI

by David Tarkowski

 

07 Jun 2004 (Updated 09 Jun 2004)

Analyze the intensity of an acquired image by line.

| Watch this File

File Information
Description

This GUI allows the user to visualize the intensity of a line in an acquired image. Each line in an image can be examined, or the values for a single line can be monitored over time.

This GUI is intended how to demonstrate how to perform some basic image analysis in real time using the Image Acquisition Toolbox.

Required Products Image Acquisition Toolbox
MATLAB release MATLAB 6.5 (R13)
Other requirements Requires MATLAB 7.0 and Image Acquisition 1.5.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
08 Nov 2004 Jonathan Barletta

Excellent demonstration. This is how to learn programming with the image acquisition toolbox and do you real-time data analysis. Well commented, and clean programming that worked on my first try.

18 Jun 2009 Borys Golik  
18 Jun 2009 Borys Golik

Thank you for this great demo! It worked just out-of-the-box! However, stepping through your code I've noticed some things which could be optimized:

1. Checking for the input arguments (line 30f) will fail if you try to pass an invalid videoinput object, e.g. one being deleted by delete(obj) but which is still in your workspace. In my opinion it would be better to rewrite the error-condition as follows:

elseif ( (nargin == 1) && (~isa(obj, 'imaqdevice') || ~isvalid(obj)) )
% error handling
end

2. It worked better for me to use imshow instead of imscale function updating the image axes (line 311) since imshow seems to preserve the aspect ratio.

3. It might be a good idea to convert YCbCr color space to RGB before displaying it in line 311. This way the red line indicating the selected video line will remain red (without conversion its green) and the image will look naturally. I just put

data = ycbcr2rgb(data);

into the switch-statement beginning in line 276 into the 'ycbcr' case. Alternatively you can put this conversion into the switch-statement beginning in the line 239 or even reduce this two switch-statements into one since they both switching the same parameter. I didn't try this, but it should work.

However these are just small things without great impact on the functionality. So I'd like to thank you again for this clean and well documented demo!

29 Nov 2011 Suhas Deshpande

Hi David
Can you suggest what changes I need to make if I wanted to use this tool with pre-acquired images.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
example David Tarkowski 22 Oct 2008 07:22:29
application David Tarkowski 22 Oct 2008 07:22:29
imaq David Tarkowski 22 Oct 2008 07:22:29
image David Tarkowski 22 Oct 2008 07:22:29
acquistion David Tarkowski 22 Oct 2008 07:22:29
gui David Tarkowski 22 Oct 2008 07:22:29
test and measurement David Tarkowski 22 Oct 2008 07:22:29

Contact us at files@mathworks.com