Prev: Windows 7 Home Premium vs. Windows 7 Professional (using MATLAB R2007a or R2007b)
Next: extract field in excel
From: AZZA Foster on 30 Apr 2010 12:05 "AZZA Foster" <Aaron.Foster17(a)ntlworld.com> wrote in message <hreu5g$gf3$1(a)fred.mathworks.com>... > > Just a long shot, is it possible to rotate the bounding box by 1 degree with the image?? As this will also solve my problem. Just ran your code Analyst, not bad, but i need at least 1 outer blob on on each edge on the barcode, so when i run the bounding box code it binds around the outer edges of the blobs, AKA the barcode itself only. Im going to have a sit done for a bit and have a serious think, it has work before. Its all about the finding the right function (s) for the job, it just takes me ages to string something together. LOL
From: AZZA Foster on 30 Apr 2010 12:21 I have found the following link, where a similar problem has been raised. http://www.mathworks.com/matlabcentral/newsreader/view_thread/259513#676274 Ashish says use tformarray(), image analyst have you had much experience in using this, do you think it would work in my situation?? The matlab link below describes it as a spatial transformation, which would help, but no image examples are shown. http://www.mathworks.com/access/helpdesk/help/toolbox/images/tformarray.html
From: ImageAnalyst on 30 Apr 2010 14:07 Well then just put your cursor in imrotate and hit control-D to get to the source code. Then search for padarray and replace the argument 0 with 255 so that it will pad with 255 (white). Then (very important) save the file as new file called imrotate_whitefill.m so you don't overwrite the original imrotate. Pretty simple fix.
From: AZZA Foster on 30 Apr 2010 14:50 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <fdf599ea-5a5e-4b9a-985b-9f5ede8636b8(a)v18g2000vbc.googlegroups.com>... > Well then just put your cursor in imrotate and hit control-D to get to > the source code. Then search for padarray and replace the argument 0 > with 255 so that it will pad with 255 (white). Then (very important) > save the file as new file called imrotate_whitefill.m so you don't > overwrite the original imrotate. > > Pretty simple fix. Absolute Legend!!!!!!!!, i didn't know how to get to source code, i didn't think it was that easy. I knew it was possible but i didnt know if imrotate would be that easy to change, thanks Image Analyst. I am used to using Visual Studio and Autodesk, so im still not familar with all the works. LEGEND!!!!!!!!!!!!!!!!!!!!!
From: ImageAnalyst on 30 Apr 2010 15:12
On Apr 30, 12:21 pm, "AZZA Foster" <Aaron.Foste...(a)ntlworld.com> wrote: > I have found the following link, where a similar problem has been raised.http://www.mathworks.com/matlabcentral/newsreader/view_thread/259513#... > > Ashish says use tformarray(), image analyst have you had much experience in using this, do you think it would work in my situation?? > > The matlab link below describes it as a spatial transformation, which would help, > but no image examples are shown.http://www.mathworks.com/access/helpdesk/help/toolbox/images/tformarr... ------------------------------------------------------------------------------ Yes, I've done it that way. I have one file where I ran the corners of the image through tformfwd and found out where they went to, and then used poly2mask but I didn't feel like digging it up and posting it. However it's short - only a few lines. But I think in your case, it might be best and easiest just to make your own version of imrotate that pads the array with white, just like you wanted, and just like I explained how to do in my prior post. -ImageAnalyst |