Steve on Image Processing and MATLAB

Concepts, algorithms & MATLAB

Getting MATLAB code from blog postings – An update 6

Posted by Steve Eddins,

Loren and I frequently use the MATLAB publish feature to create our blog posts. Back in October, we started using some JavaScript in our blogs so you could click on a link to get the original MATLAB code. (Look for a link that says "Get the MATLAB code") at the bottom right of many of our posts. Then some readers complained that the JavaScript was messing up the appearance of our posts in the feed-reader software they used.

I believe we have now corrected the problem. JavaScript code inside HTML script tags is now hidden inside HTML comment tags, so it should not appear in browsers or feed readers that do not support JavaScript. If you still see this problem, please let me know what browser or feed reader you use.


Comments are closed.

6 CommentsOldest to Newest

Ramiro Massol replied on : 1 of 6
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
Steve replied on : 2 of 6
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;
Anju replied on : 3 of 6
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?