MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Thread Subject: Beginner Imaging Help -fill and roi selection

 Subject: Beginner Imaging Help -fill and roi selection From: Asley Date: 11 Dec, 2008 00:13:01 Message: 1 of 4 Hi, I recently started using MatLab and I've run into some problems I cant solve. Went through all the help files i could find, but nothing to address my problem (that I could see). First of all, I have several images that have a varying size (333x333, 320 x 320), all of which have an off centre axis (I keep the xdat and ydat after using imtransform). ie. the axis for the 333x333 is x= -167:165 and y=-156:177 I am trying to standardize the image size by filling it up the smaller sides to a 400x400 matrix (x and y go from -200 to 200). This way I can sum the images together, with the (0,0) for all images being the same (and in the centre). using the help I found how to overlay (imshow + hold on + set) but it doesn't give me a resultant image matrix. I can't find a way to keep the original image, in its same size, but enlarge the borders to a standard length (hope thats not too confusing) Secondly, I have a black background, with a white polygon in the middle. I want to find the coordinates that delineate the edge of that white shape. 'roipoly' requires me to manually plot the points which is not viable, and other edge detection only returns another image with only that shape. I require the coordinates of the points so that if i use impoly, it will redraw the shape. So an automatic way of doing this would be more accurate as well as faster! Thanks for your help.
 Subject: Beginner Imaging Help -fill and roi selection From: Asley Date: 11 Dec, 2008 00:17:04 Message: 2 of 4 Alternatively for problem 1, is there a way to compress an overlay image define by: figure; imshow(t1, 'XData', x1, 'YData', y1) hold on h = imshow(t2, 'XData', x2, 'YData', y2) hold on f = imshow(t3, 'XData', x3, 'YData', y3); set(h, 'AlphaData', 0.6) set(f, 'AlphaData',0.6); into single image matrix? (again, all different dimensions)
 Subject: Beginner Imaging Help -fill and roi selection From: ImageAnalyst Date: 11 Dec, 2008 14:01:30 Message: 3 of 4 Asley wrote: > Hi, > I recently started using MatLab and I've run into some problems I cant so= lve. Went through all the help files i could find, but nothing to address m= y problem (that I could see). > > First of all, I have several images that have a varying size (333x333, 32= 0 x 320), all of which have an off centre axis (I keep the xdat and ydat af= ter using imtransform). > ie. the axis for the 333x333 is x=3D -167:165 and y=3D-156:177 > I am trying to standardize the image size by filling it up the smaller si= des to a 400x400 matrix (x and y go from -200 to 200). This way I can sum t= he images together, with the (0,0) for all images being the same (and in th= e centre). using the help I found how to overlay (imshow + hold on + set) b= ut it doesn't give me a resultant image matrix. I can't find a way to keep = the original image, in its same size, but enlarge the borders to a standard=  length (hope thats not too confusing) > > Secondly, I have a black background, with a white polygon in the middle. = I want to find the coordinates that delineate the edge of that white shape.=  'roipoly' requires me to manually plot the points which is not viable, and=  other edge detection only returns another image with only that shape. I re= quire the coordinates of the points so that if i use impoly, it will redraw=  the shape. So an automatic way of doing this would be more accurate as wel= l as faster! > > Thanks for your help. ---------------------------------------------------------------------------= ---------------------------------- Asley: For the first question, use the padarray() function to match array sizes by padding out smaller dimensions. For the second question, use bwboundaries() in the image processing toolkit. Good luck, ImageAnalyst
 Subject: Beginner Imaging Help -fill and roi selection From: Asley Date: 12 Dec, 2008 01:01:04 Message: 4 of 4 Thank you for the help ImageAnalyst, that was exactly what I was after! Regards Asley ImageAnalyst wrote in message <9c209dc0-b271-4117-a5d8-09ad57fb2e56@f11g2000vbf.googlegroups.com>... > > > Asley wrote: > > Hi, > > I recently started using MatLab and I've run into some problems I cant so= > lve. Went through all the help files i could find, but nothing to address m= > y problem (that I could see). > > > > First of all, I have several images that have a varying size (333x333, 32= > 0 x 320), all of which have an off centre axis (I keep the xdat and ydat af= > ter using imtransform). > > ie. the axis for the 333x333 is x=3D -167:165 and y=3D-156:177 > > I am trying to standardize the image size by filling it up the smaller si= > des to a 400x400 matrix (x and y go from -200 to 200). This way I can sum t= > he images together, with the (0,0) for all images being the same (and in th= > e centre). using the help I found how to overlay (imshow + hold on + set) b= > ut it doesn't give me a resultant image matrix. I can't find a way to keep = > the original image, in its same size, but enlarge the borders to a standard= > length (hope thats not too confusing) > > > > Secondly, I have a black background, with a white polygon in the middle. = > I want to find the coordinates that delineate the edge of that white shape.= > 'roipoly' requires me to manually plot the points which is not viable, and= > other edge detection only returns another image with only that shape. I re= > quire the coordinates of the points so that if i use impoly, it will redraw= > the shape. So an automatic way of doing this would be more accurate as wel= > l as faster! > > > > Thanks for your help. > ---------------------------------------------------------------------------= > ---------------------------------- > Asley: > For the first question, use the padarray() function to match array > sizes by padding out smaller dimensions. > For the second question, use bwboundaries() in the image processing > toolkit. > Good luck, > ImageAnalyst