An open exchange for the MATLAB and Simulink user community |
Hosted by The MathWorks |
|
| Related Topics |
| New Products | Support | Documentation | Training | Webinars | Jobs | Newsletters |
| Problems? Suggestions? Contact us at files@mathworks.com | © 1994-2008 The MathWorks, Inc. Trademarks Privacy Policy |
hi Steve
Everyday I read your blog site to get useful ideas about image processing. I appreciate very much your advices and code that you provide to the community.
I have a few problems that I have been unable to resolve for a long time. I created a GUI to display a time series of images (16-bit, multiple channels) using gray scale or RGB colormaps. The GUI has a slider to scroll through the different time points of the time series. The GUI has also buttons to allow the user to enter annotations (textboxes and arrows). The problems are the following:
1) Annotations: after creating an annotation, let’s say a textbox, if I scroll the a different time point of the series the new image will be plotted on top of the annotation. How do I move to the front the pre-created annotation? I haven’t seen that property in the annotation properties.
2) Colormap problems: the GUI has sliders that control the black shown and white levels of the displayed image. It’s no problem for me to adjust these levels when the images shown are grayscale or more precisely single channel. For instance:
black level: pixels of equal or lower intensity are shown in black
white level: pixels of equal or higher intensity are shown as white
image: 16-bit grayscale
imshow(image,[black level white level])
However, if the image that I want to display is an RGB composite (3 channels, each a 16-bit channel), I cannot manage to force pixels whose intensities in one channel are below a certain black level to have no contribution in that specific channel (i.e., let’s say that pixels of the red channel below 200 units should have no redish coloring). My code is the following:
rgbimage=zeros(imageheight, imagewidth, 3,’uint16′);
RGBVALUES = [0 0 0;1 1 1];
% redimagechannel, greenimagechannel, blueimagechannel are 16-bit tiff images
rgbimage(:,:,1)=redimagechannel;
rgbimage(:,:,2)=greenimagechannel;
rgbimage(:,:,3)=blueimagechannel;
RGB = imadjust(rgbimage,RGBVALUES,[],1);
axes(gca)
imshow(RGB);
I appreciate any help on these issues.
best regards
ramiro
Ramiro - I don’t generally give GUI programming advice, but I think for your question 1 you might want to look at the stacking order of the various objects involved. Take a look at the MATLAB function uistack.
Regarding question 2, try this:
red = rgbimage(:,:,1);
red(red < 200) = 0;
rgbimage(:,:,1) = red;
Hi I am new to this field and I am currently working on a face recognition system.
I have to display several images inside a panel. I have already created the GUI with two panels but don’t know how to display the images inside one of them. Can you please help me?
Anju—See this page for some getting-started resources on GUI programming with MATLAB.
can i have a code in matlab for image acquisition by a webcam or handi cam.
Fuad—Take a look at Image Acquisition Toolbox.