comp.soft-sys.matlab - The MathWorks calculation and visualization package.
Hello, i am working with spacial phase modulator, that is connected to my computer like a secondary display, and i can controll it by puting a grayscale image on the secondary display in full screen. I would like to do it in matlab if its possible, (i calculate the phase image in matlab by a Gerchberg-Saxton algorithm) Ii could do it with a figure positioned in the secondary monitor, but my problem is that the figure title bar cannot be removed, so my image does not fill the screen entirely. Is there any way to display just the image itself on the screen? thanks for Your help!
Hi, I was wondering if any one know how to extract objects from a number of frames and then display these objects on another background. So far i have managed to find my objects and draw bounding boxes around them. I have got a background and displayed these bounding boxes on the background with no problem at all. However now i need to display the segmented parts on the background. Thanks! I have the locations of the pixels of the objects and all objects have been labelled using bwlabel so i can view each object in binary. I just don;t know how to extract object in rgb to new background
Hi all, I have a binary image matrix containing a bunch of points for which I want to draw the convex hull (basically, store it as another binary image). The approach I've tried to use is to first get the convex hull vertices using the imagefeature() function from the Image Processing Toolbox, then to plot these points as a 2-D polygon in a figure window (using the fill command). So far everything's okay, but now I want to convert this figure back to a binary image such that my points from the figure window conform to the dimensions and pixel locations of my original image. I've tried playing with various properties of the axes handle (rather arbitrarily I admit) but I can't seem to get the size right in my final image [which I obtain using the getframe() function on the axes handle, followed by binary thresholding using imbw() ] Here's a sample of my code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % A random binary image: I = zeros(240, 320); I(10,40) = 1; I(200,90) = 1; I(150, 100) = 1; I(60, 200) = 1; I(50, 50) = 1; % Getting the convex hull and % plotting in figure window: I = uint8(I); stats = imfeature(I, 'ConvexHull'); xi = stats.ConvexHull(:,1); yi = stats.ConvexHull(:,2); figure; fill(xi, yi, 'r'); % Fiddling with axes handle properties % with the hopes that something works: h = gca; set(h, 'Units', 'Pixels'); set(h, 'xlim', [1 320]); set(h, 'ylim', [1 240]); set(h, 'DataAspectRatio', [1 1 1]); set(h, 'XTick', ) set(h, 'YTick', ) set(h, 'Box', 'off'); % Converting figure to image: img = getframe(h, [1 1 320 240]); bw=~im2bw(img.cdata,.9); I1 = bw(end:-1:1, :); %The prev statement flips the y-axis %upside down, I1 now contains my convex % hull image figure; imshow(I); figurel imshow(I1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The result seems right, except for the scaling factor. Can someone help me fix this, or better yet, suggest a better or more direct way to go about it in the first place? Thanks in advance, Akiel
Rajasekar wrote: > > > Hi friends, > > I have to read an color image using 'imread' and display an color > image using 'imshow'... > but when i am reading an image format of type '.png format'. > and displaying it, > it display in black/white format. > not in color format.. > > how to get an color display......... Carefully read doc imread and take a look at the second return value. You may also read doc ind2rgb -Herbert