This code assumes that to split the character from an image in matlab. The code was given to me by Lucas, so thanks Lucas.
The problem is I want to understand how the character is divided, I do not want to use it before understanding it.
Can anyone explain to me this ... Thanks
Lucas Code:
Clear all; close all; I = Remat ('plate.jpg'); BW = IM2BW (I, 0.9); Bw = ~ bw; Statistics = FieldProp (BW); For index = 1: length (statistics) if statistics (index). Area & gt; 200 & amp; Amp; Statistics. Bounding Box (3) * Statistics (index). Bounding Box (4) & lt; 30000 x = seat (statistics). Bounding Box (1) y = CEL (index). Bounding Box (2)) widthX = Flooring (Statistics) Bounding Box (3) -1) Width Y = Flooring (index). Bounding Box (4) -1) Yield (Index) = {BW (Y: Y + width Y, X: X + width X, :)}; Figure, imShow (subimage {index}) and end link:
Clear all ; Clean up the% workspace memory; Close all stats I = imread ('plate.jpg'); % Load Image in JPG I BW = IM2BB (I, 0.9); % Color Black Image converted to black and white image BW = ~ BW; Swap black and white statistics = fieldprop (bw); % Calculation 'Area', 'Centroid', and 'BoundingBox' measurements. % Area is a proxy operation that cuts the image "possibly" cuts into possible pieces of interest. For the% resource you will need to develop your code for index = 1: length (statistics)% if the field statistics have a fixed benchmark Statistics (index) .Area & gt; 200 & amp; amp; amp; amp; amp; amp; amp; mm; Index; (Index). Bounding Box (1)) y = CEL (index) Bounding Box (2)) widthX = Flooring (Statistics) Bounding Box (3) -1) Width Y = Floor (Index). Boxing Box (4) -1)% From Original Image Remove a sub-continent and show it.Subimage (index) = {BW (y: y + widthY, x: x + widthX, :)}; suggested by Eugene, review the provided link.
Comments
Post a Comment