Rank: 34858 based on 0 downloads (last 30 days) and 0 files submitted
photo

Borys Golik

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Borys View all
Updated File Comments Rating
22 Mar 2010 mmread Read virtually any media file in Windows, Linux, or Mac. Author: Micah Richert
18 Jun 2009 Line value GUI Analyze the intensity of an acquired image by line. Author: David Tarkowski

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!

18 Jun 2009 Line value GUI Analyze the intensity of an acquired image by line. Author: David Tarkowski

Contact us at files@mathworks.com