Prev: Windows 7 Home Premium vs. Windows 7 Professional (using MATLAB R2007a or R2007b)
Next: extract field in excel
From: AZZA Foster on 27 Apr 2010 19:32 No worries guys im going to play with the subimage function, just stubbled across it on another thread, posted by image analyst.
From: AZZA Foster on 28 Apr 2010 15:23 does anyone know how to open files incrementally e.g. %%%Open image1 N = 1; filename = (Image, (N)); Imread(filename, jpg); %% read-in image1.jpg N = N++;
From: ImageAnalyst on 28 Apr 2010 16:07 On Apr 28, 3:23 pm, "AZZA Foster" <Aaron.Foste...(a)ntlworld.com> wrote: > does anyone know how to open files incrementally e.g. > %%%Open image1 > > N = 1; > filename = (Image, (N)); > Imread(filename, jpg); %% read-in image1.jpg > N = N++; ---------------------------------------------------------------- See section 4.12 of the FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ#How_can_I_process_a_sequence_of_files.3F Basically you use sprintf() to build up your filename.
From: AZZA Foster on 28 Apr 2010 19:35 Great help image analyst thanks alot, i'll sort the code out for that tomorrow/today.
From: AZZA Foster on 29 Apr 2010 09:21
http://drop.io/ifihag5 Image Analyst i have uploaded a figure file of my barcode that has been extracted from the original image. The problem i have is that the barcode is slanted, i know the method i need to use the barcode centered, but dont know how to implement it. Center the barcode without using the rotation tool, i should be able to tell matlab, find the middle point of the whole barcode image, once this has been found position only the black pixels around this center point. Any ideas helpful. e.g. i was thinking of something like this: %% Use the X and Y axis sizes of the Bounding Box image. horizontalProfile = max(subimage, [], 1); x3 = find(horizontalProfile, 1, 'first'); x4 = find(horizontalProfile, 1, 'last'); verticalProfile = max(subimage, [], 2); y3 = find(verticalProfile, 1, 'first'); y4 = find(verticalProfile, 1, 'last'); boxX = [x1 x2 x2 x1 x1]; boxY = [y1 y1 y2 y2 y1]; %% Use x2 and y2 values to calculate thecentre of the bounding box. Center = x2/2 , y2/2 %% This is where i got stuck, i need the intersection of "Center" given the two values obtained half way across the x axis and halfway up the y axis. Then i can say "Somehow" Plot all the black pixels areound the center point specified. |