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 15:25 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. Just made the change and saved the file, work like a charm!!, Scratching my head and trying different functions for about 8 hours and all it need was me to input 3 numbers into an m.file. Im so happy, BUT SO ANGRY at the same time. LOL THANKS IMAGE ANALYST !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
From: AZZA Foster on 1 May 2010 11:17 "AZZA Foster" <Aaron.Foster17(a)ntlworld.com> wrote in message <hrfar1$cln$1(a)fred.mathworks.com>... > 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. > > Just made the change and saved the file, work like a charm!!, Scratching my head and trying different functions for about 8 hours and all it need was me to input 3 numbers into an m.file. Im so happy, BUT SO ANGRY at the same time. LOL > THANKS IMAGE ANALYST !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Image analyst how do i get rid of the ZERO padding in imrotate, as the change above has change the black pixels to white, which is good, but it would be better if i could get rid of the ZERO padding in imroate also, can i just delete the whole padding line???
From: ImageAnalyst on 1 May 2010 11:28 On May 1, 11:17 am, "AZZA Foster" <Aaron.Foste...(a)ntlworld.com> wrote: > Image analyst how do i get rid of the ZERO padding in imrotate, as the change above has change the black pixels to white, which is good, but it would be better if i could get rid of the ZERO padding in imroate also, can i just delete the whole padding line??? -------------------------------------------------------------------------------- Use the 'crop' option of imrotate to clip off the corners that get rotated outside the original boundaries.
From: AZZA Foster on 1 May 2010 11:31 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <f5a7c5af-be56-4e36-86e8-5bcb18e2452f(a)37g2000yqm.googlegroups.com>... > On May 1, 11:17 am, "AZZA Foster" <Aaron.Foste...(a)ntlworld.com> wrote: > > Image analyst how do i get rid of the ZERO padding in imrotate, as the change above has change the black pixels to white, which is good, but it would be better if i could get rid of the ZERO padding in imroate also, can i just delete the whole padding line??? > -------------------------------------------------------------------------------- > > Use the 'crop' option of imrotate to clip off the corners that get > rotated outside the original boundaries. I changed the [2,2] padding size to [0,0], which should mean no padding?? hopefully.
From: AZZA Foster on 1 May 2010 12:03
"AZZA Foster" <Aaron.Foster17(a)ntlworld.com> wrote in message <hrhhfq$oti$1(a)fred.mathworks.com>... > ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <f5a7c5af-be56-4e36-86e8-5bcb18e2452f(a)37g2000yqm.googlegroups.com>... > > On May 1, 11:17 am, "AZZA Foster" <Aaron.Foste...(a)ntlworld.com> wrote: > > > Image analyst how do i get rid of the ZERO padding in imrotate, as the change above has change the black pixels to white, which is good, but it would be better if i could get rid of the ZERO padding in imroate also, can i just delete the whole padding line??? > > -------------------------------------------------------------------------------- > > > > Use the 'crop' option of imrotate to clip off the corners that get > > rotated outside the original boundaries. > > I changed the [2,2] padding size to [0,0], which should mean no padding?? hopefully. The padding size still had no affect, i tell you what im trying to do, im trying to put a bounding box around around the rotatedbarcode. Using this code the box is being placed around the padding cells, not the black area of the image. Youll see what i mean if you put this code in using the barcode image supplied at http://drop.io/ifihag5 (Dont use the barcode with the black padding cells on it). subimage3 = imrotate_whitefill (subimage2, 8,'crop'); horizontalProfile2 = max(subimage3, [], 1); x5 = find(horizontalProfile2, 1, 'first'); x6 = find(horizontalProfile2, 1, 'last'); verticalProfile2 =max(subimage3, [], 2); y5 = find(verticalProfile2, 1, 'first'); y6 = find(verticalProfile2, 1, 'last'); boxX3 = [x5 x6 x6 x5 x5]; boxY3 = [y5 y5 y6 y6 y5]; imshow (subimage3, []); hold on; plot (boxX3,boxY3,'r-'); You see i need the box around the black region, so i can monitor the barcode rotation around the X and Y axis until the barcode is central. |