CN108205811A - A kind of plant leaf blade minimum enclosed rectangle computational methods - Google Patents
A kind of plant leaf blade minimum enclosed rectangle computational methods Download PDFInfo
- Publication number
- CN108205811A CN108205811A CN201611230672.7A CN201611230672A CN108205811A CN 108205811 A CN108205811 A CN 108205811A CN 201611230672 A CN201611230672 A CN 201611230672A CN 108205811 A CN108205811 A CN 108205811A
- Authority
- CN
- China
- Prior art keywords
- main shaft
- rectangle
- minimum
- plant leaf
- leaf blade
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30181—Earth observation
- G06T2207/30188—Vegetation; Agriculture
Abstract
The invention discloses a kind of plant leaf blade minimum enclosed rectangle computational methods, including:S1, Image Acquisition are simultaneously pre-processed;S2 determines central point and main shaft;S3, rotation and translation main shaft obtain new boundary rectangle and calculate its area;S4 asks for minimum boundary rectangle.The present invention program defines rotation section using horizontal spindle and vertical major, in the acute angle that minimum external matrix search range is formed in the two, the region of search is reduced compared to general rotary process, so that the process for entirely finding minimum enclosed rectangle greatly reduces number of revolutions, it is greatly improved to arithmetic speed.
Description
Technical field
The invention belongs to vision positioning fields, are related to a kind of plant leaf blade minimum enclosed rectangle computational methods.
Background technology
The minimum enclosed rectangle of plant leaf blade has uniqueness, it reflects certain spies of plant leaf blade to a certain extent
Sign, such as length and width, rectangular degree are one of important evidence for judging plant leaf blade type and understand growth and development of plants feelings
The important evidence of condition.Therefore, extraction plant leaf blade minimum enclosed rectangle has important application value, such as utilizes minimum external square
Shape rebuilds threedimensional model, the actual size for obtaining plant leaf blade of plant leaf blade etc..
Common minimum enclosed rectangle computational methods are to ask for minimum area rectangle etc., i.e., are first solved using Graham Sodd method of investing method
The edge of target image, the mode for reusing rotation or projection ask for the minimum area rectangle in region included by edge.General feelings
Rotary process cannot obtain accurate minimum area boundary rectangle under condition, because its result precision depends on rotation selected every time
The size of gyration, in order to obtain more accurate minimum enclosed rectangle, this method need as much as possible to reduce interval, but its
Number of revolutions will increase with interval inverse proportion, so as to necessarily occupy more system times.
Invention content
The purpose of the present invention is to overcome the deficiency in the prior art, especially solves existing minimum area rectangle computational methods meter
The problem of calculation is inaccurate, and calculation times are excessive.A kind of plant leaf blade minimum enclosed rectangle computational methods are provided, extract plant first
The initial boundary rectangle in leaf image region determines initial boundary rectangle central point and main shaft, then continuous rotation and translation main shaft,
Obtain new boundary rectangle, reference area size optimizing to minimum enclosed rectangle.
In order to solve the above technical problems, the present invention adopts the following technical scheme that:A kind of plant leaf blade minimum enclosed rectangle
Computational methods, the method includes:S1, Image Acquisition are simultaneously pre-processed;S2 determines central point and main shaft;S3, rotation peace
Shift spindle obtains new boundary rectangle and calculates its area;S4 asks for minimum boundary rectangle.
Wherein, step S1 includes:S11 Image Acquisition, S12 gray proces, S13 image filterings, S14 image binaryzations;
Step S2 includes:S21 determines that initial boundary rectangle, S22 determine main shaft initial position;
Step S3 includes:S31 live spindles, S32 translations main shaft, S33 extractions boundary.
The present invention has following advantageous effect compared with prior art:
The present invention program defines rotation section using horizontal spindle and vertical major, and minimum external matrix search range exists
In the acute angle that the two is formed, the region of search is reduced compared to general rotary process so that the entire mistake for finding minimum enclosed rectangle
Journey greatly reduces number of revolutions, is greatly improved to arithmetic speed.
Description of the drawings
Fig. 1 is the flow chart of the plant leaf blade minimum enclosed rectangle computational methods of the embodiment of the present invention.
Fig. 2 is the realization design sketch of an alternative embodiment of the invention.
Specific embodiment
Below in conjunction with the accompanying drawings and specific embodiment the present invention is carried out in further detail with complete explanation.It is appreciated that
It is that specific embodiment described herein is only used for explaining the present invention rather than limitation of the invention.
Reference Fig. 1, a kind of plant leaf blade minimum enclosed rectangle computational methods of the invention, the method includes:
S1, Image Acquisition are simultaneously pre-processed.Image Acquisition is carried out to plant leaf blade first, but the illumination for acquiring environment is strong
The factors such as degree, the floating material in air, the dust that is likely to occur around camera lens can all influence the effect of leaf image acquisition
Fruit.Processing procedure includes:S11 Image Acquisition, S12 gray proces, S13 image filterings, S14 image binaryzations.
S11, Image Acquisition.Digital image data is collected to the process in computer, the present invention uses line array CCD industry
Camera carries out Image Acquisition, and gives the digital image data after acquisition to computer and handle.
Line array CCD is simple in structure relative to area array CCD, has cost relatively low, real-time Transmission light-to-current inversion signal and sweeps certainly
It is fast to retouch speed, frequency response is high, the advantages that can realizing that dynamic measures, and can work under low-light (level).
S12, gray proces.Video camera obtain image be coloured image, comprising contain much information, image processing speed compared with
Slowly.In view of the requirement of real-time, and the calculating of plant leaf blade minimum enclosed rectangle is not needed to using colour information, to cromogram
It is necessary as carrying out gray processing processing.Gray processing is exactly the equal process of the R, G for making colour element, B component value, gray level image
In gray value be equal to original color image in RGB average values, i.e.,
Gray=(R+G+B)/3 (1)
S13, image filtering.A sliding window M is selected, the gray value of pixel in window is ranked up and takes intermediate value,
Then the gray value of specified pixel is replaced with the intermediate value, i.e.,
G (x, y)=med { f (x-i, y-j) } (2)
Med takes median operation for sequence;I, j ∈ M;F (x, y) is each grey scale pixel value in window M.
It should be noted that the pixel in sliding window M takes odd number under normal circumstances, convenient for taking intermediate value;If pixel takes
Even number, intermediate value are the average value of intermediate two grey scale pixel values.
S14, image binaryzation.In order to which more preferably target to be detected in image is distinguished with background, it usually needs will scheme
As carrying out binary conversion treatment.Image binaryzation has many methods, and the most commonly used is threshold method, basic principle is by setting
Determine binary conversion treatment gray threshold T, pixel f (x, y) of the gray value of image more than threshold value T is replaced with 255, otherwise with 0
Instead of that is,:
G (x, y) be binaryzation after image, by above-mentioned formula, we can be clearly seen that, binary conversion treatment it
Afterwards, original image gray value becomes only 0 and 255 bianry image.Gray value in image is 0 to be partially shown as carrying on the back by we
Scape is worth and is partially shown as target to be detected for 255.
S2 determines central point and main shaft.Its process includes:S21 determines that initial boundary rectangle, S22 determine main shaft initial bit
It puts.
S21 determines initial boundary rectangle.Since image boundary, respectively from left to right, from right to left, from top to bottom, from
Under supreme 4 scanning direction leaf images, obtain plant leaf blade boundary, the i.e. straight line there are certain point f (x, y)=0, if on
Boundary linear equation is x=x1, lower boundary linear equation is x=x2, left margin thread equation is y=y1, right margin linear equation
For y=y2.With this 4 initial boundary rectangles of border delineation plant leaf blade.
S22 determines main shaft initial position.If initial boundary rectangle central point O coordinates are (xo, y0), wherein:xo=(x1+
x2)/2, yo=(y1+y2)/2.Central point O is enabled orthogonal 2 main shafts to be created, if vertical major both ends point coordinates for origin
Respectively A (1, y0) and B (c, y0), horizontal spindle both ends point coordinates is respectively C (xo, 1) and D (xo, k), wherein, c and k difference
Width and height for boundary rectangle.
S3, rotation and translation main shaft obtain new boundary rectangle and calculate its area.Its process include S31 live spindles,
S32 translations main shaft, S33 extractions boundary.
S31 live spindles.Both horizontal spindle and vertical major are mutually perpendicular to, and rotation section is limited to intersecting acute angle area
Domain, therefore, around initial 0 live spindle θ degree counterclockwise of boundary rectangle midpoint, 0 ° of 90 ° of < θ <.If 4 endpoint of main shaft rotates recoil
Mark is respectively A ' (xa, ya), B ' (xb, yb), C ' (xc, yc), D ' (xd, yd).Calculation formula is as follows:
S32 translates main shaft.Main shaft translation direction has up, down, left and right four directions, it is therefore desirable to according to Spindle rotation angle degree
θ values change two-end-point coordinate value, and translation paces are 1 pixel, and translation main shaft rule is as follows:
(1) if 0 ° of < θ≤45 °, (x values add 1 to translate downwards or x values subtract 1 and put down upwards for horizontal spindle modification two-end-point x values
It moves);Vertical major modification two-end-point y values (y values add 1 to subtract 1 to left to right translation or y values).
(2) if 45 ° of < θ≤90 °, (y values add 1 to subtract 1 to the left to right translation or y values to horizontal spindle modification two-end-point y values
Translation);Vertical major modification two-end-point x values (x values add 1 to translate downwards or x values subtract 1 and translate up).
S33 extracts boundary.
When 0 ° of < θ≤45 °, then vertical major two-end-point y values add 1 to obtain right margin to right translation, then vertical major two
Endpoint y values subtract 1 and obtain left margin to left, and horizontal spindle two-end-point x values add 1 translation downwards to obtain lower boundary, then horizontal
Main shaft two-end-point x values subtract 1 and translate up acquisition coboundary;
It is translated up when x values subtract 1, then vertical major two-end-point x values add 1 translation downwards to obtain lower boundary, then vertical main
Axis two-end-point x values subtract 1 and translate up acquisition coboundary, and horizontal spindle two-end-point y values add 1 to obtain right margin to right translation, then
Horizontal spindle two-end-point y values subtract 1 and obtain left margin to left.
S4 asks for minimum boundary rectangle.
Main shaft presses the rotation steps of Δ θ=1 °, and continuous rotation and translation main shaft obtains 4 boundaries, calculates boundary Suo Wei areas
Domain area by comparing size, obtains area minimum enclosed rectangle.
Fig. 2 is the realization design sketch of another embodiment of the present invention.
Claims (1)
1. a kind of plant leaf blade minimum enclosed rectangle computational methods, which is characterized in that including:S1, Image Acquisition are simultaneously located in advance
Reason;S2 determines central point and main shaft;S3, rotation and translation main shaft obtain new boundary rectangle and calculate its area;S4 is asked for
Minimum boundary rectangle;
Wherein, the step S1 includes:Image Acquisition, gray proces, image filtering, image binaryzation;
The step S2 includes:It determines initial boundary rectangle, determine main shaft initial position;
The step S3 includes:Live spindle, translation main shaft, extraction boundary.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611230672.7A CN108205811A (en) | 2016-12-16 | 2016-12-16 | A kind of plant leaf blade minimum enclosed rectangle computational methods |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611230672.7A CN108205811A (en) | 2016-12-16 | 2016-12-16 | A kind of plant leaf blade minimum enclosed rectangle computational methods |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108205811A true CN108205811A (en) | 2018-06-26 |
Family
ID=62603334
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611230672.7A Pending CN108205811A (en) | 2016-12-16 | 2016-12-16 | A kind of plant leaf blade minimum enclosed rectangle computational methods |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108205811A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110110697A (en) * | 2019-05-17 | 2019-08-09 | 山东省计算中心(国家超级计算济南中心) | More fingerprint segmentation extracting methods, system, equipment and medium based on direction correction |
CN112991375A (en) * | 2021-02-08 | 2021-06-18 | 上海通办信息服务有限公司 | Method and system for reshaping arbitrary-shaped image area into N rectangular areas |
-
2016
- 2016-12-16 CN CN201611230672.7A patent/CN108205811A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110110697A (en) * | 2019-05-17 | 2019-08-09 | 山东省计算中心(国家超级计算济南中心) | More fingerprint segmentation extracting methods, system, equipment and medium based on direction correction |
CN110110697B (en) * | 2019-05-17 | 2021-03-12 | 山东省计算中心(国家超级计算济南中心) | Multi-fingerprint segmentation extraction method, system, device and medium based on direction correction |
CN112991375A (en) * | 2021-02-08 | 2021-06-18 | 上海通办信息服务有限公司 | Method and system for reshaping arbitrary-shaped image area into N rectangular areas |
CN112991375B (en) * | 2021-02-08 | 2024-01-23 | 上海通办信息服务有限公司 | Method and system for remolding image area with arbitrary shape into N rectangular areas |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109035276B (en) | Image edge extraction method and device and automatic driving system | |
WO2022007431A1 (en) | Positioning method for micro qr two-dimensional code | |
CN109978839B (en) | Method for detecting wafer low-texture defects | |
JP6899189B2 (en) | Systems and methods for efficiently scoring probes in images with a vision system | |
CN105354815B (en) | It is a kind of that localization method is accurately identified based on flat-type micro part | |
CN110148174A (en) | Scaling board, scaling board recognition methods and device | |
CN103824275B (en) | Saddle dots structure and the system and method for determining its information are searched in the picture | |
CN110930427B (en) | Image segmentation method, device and storage medium based on semantic contour information | |
CN109409290B (en) | Thermometer verification reading automatic identification system and method | |
US9569850B2 (en) | System and method for automatically determining pose of a shape | |
CN109190434B (en) | Bar code recognition algorithm based on sub-pixel level corner detection | |
CN110189347B (en) | Method and terminal for measuring volume of object | |
CN110378924A (en) | Level set image segmentation method based on local entropy | |
CN108205811A (en) | A kind of plant leaf blade minimum enclosed rectangle computational methods | |
CN105115443B (en) | The full visual angle high precision three-dimensional measurement method of level of view-based access control model e measurement technology | |
CN113793309B (en) | Subpixel level ellipse detection method based on morphological characteristics | |
CN113706635B (en) | Long-focus camera calibration method based on point feature and line feature fusion | |
KR102023087B1 (en) | Method for camera calibration | |
CN110223356A (en) | A kind of monocular camera full automatic calibration method based on energy growth | |
CN111354047A (en) | Camera module positioning method and system based on computer vision | |
KR101777696B1 (en) | Method For Subpixel Localization Of Edges Based on Areal Symmetry | |
KR101733028B1 (en) | Method For Estimating Edge Displacement Againt Brightness | |
CN110557622B (en) | Depth information acquisition method and device based on structured light, equipment and medium | |
CN106934846A (en) | A kind of cloth image processing method and system | |
CN104598904B (en) | The localization method and equipment at a kind of graphic code correction graph center |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180626 |