[go: up one dir, main page]

CN109035285A - Image boundary determines method and device, terminal and storage medium - Google Patents

Image boundary determines method and device, terminal and storage medium Download PDF

Info

Publication number
CN109035285A
CN109035285A CN201710437879.XA CN201710437879A CN109035285A CN 109035285 A CN109035285 A CN 109035285A CN 201710437879 A CN201710437879 A CN 201710437879A CN 109035285 A CN109035285 A CN 109035285A
Authority
CN
China
Prior art keywords
boundary point
boundary
straight line
singular value
fitting
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.)
Granted
Application number
CN201710437879.XA
Other languages
Chinese (zh)
Other versions
CN109035285B (en
Inventor
李�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201710437879.XA priority Critical patent/CN109035285B/en
Publication of CN109035285A publication Critical patent/CN109035285A/en
Application granted granted Critical
Publication of CN109035285B publication Critical patent/CN109035285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/2008Testing patterns thereon using pre-processing, e.g. de-blurring, averaging, normalisation or rotation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Abstract

The invention discloses a kind of image boundaries to determine method and device, terminal and storage medium, wherein this method comprises: be directed to image every side, extract image the side multiple boundary points;Singular value decomposition is carried out according to the multiple boundary point, obtains singular value;Singular value is adjusted according to preset threshold;Boundary point is reconstructed using singular value adjusted;Straight line fitting is carried out according to the boundary point after reconstruct, determines image on the boundary of the side.The present invention can exclude the interference of abnormal point or noise spot to straight line fitting in boundary point, improve the precision of straight line fitting, so that the image boundary determined is more accurate.

Description

Image boundary determines method and device, terminal and storage medium
Technical field
The present embodiments relate to image processing techniques more particularly to a kind of image boundary to determine method and device, terminal And storage medium.
Background technique
Paper money recognition process needs to pre-process banknote image, including denoising, luminance compensation, edge detection and inclination Correction.In edge detection process, bank note boundary point is searched for, straight line fitting is carried out using these discrete boundary points, can obtain To the edge of bank note, and then the central point and tilt angle that can calculate bank note make figure then by banknote image rotation correction Image position normalization.
But bank note will appear tearing, gauffer, dog-ear, situations such as being stained in the circulation process, it will when searching for boundary point There is noise or abnormal point, these noises or abnormal point will affect the linear precision of fitting, and then influence the place to banknote image Reason, or even will affect the identification of bank note.
In view of the above-mentioned problems, currently no effective solution has been proposed.
Summary of the invention
The present invention provides a kind of image boundary and determines method and device, terminal and storage medium, can effectively exclude boundary Abnormal point in point avoids influence of the abnormal point to straight line fitting precision, so that the image boundary of fitting is more accurate.
In a first aspect, the embodiment of the invention provides a kind of image boundaries to determine method, comprising:
For every side of image, described image is extracted in multiple boundary points of the side;
Singular value decomposition is carried out according to the multiple boundary point, obtains singular value;
The singular value is adjusted according to preset threshold;
Boundary point is reconstructed using singular value adjusted;
Straight line fitting is carried out according to the boundary point after reconstruct, determines described image on the boundary of the side.
Preferably, the singular value is adjusted according to preset threshold, comprising: be respectively compared each singular value with it is described The size of preset threshold;If singular value is less than the preset threshold, which is adjusted to 0.
Preferably, singular value adjusted is utilized to reconstruct boundary point, comprising: to utilize singular value decomposition formula and adjusted Singular value calculates new boundary point.
Preferably, singular value decomposition is carried out according to the multiple boundary point, comprising: by the number of coordinates of the multiple boundary point According to composition boundary dot matrix;Singular value decomposition is carried out to the boundary dot matrix.
Preferably, before carrying out singular value decomposition according to the multiple boundary point, the method also includes:
The multiple boundary point is segmented;
Best-fitting straight line is determined according to the boundary point of segmentation and its corresponding fitting a straight line;
The deviation of each boundary point and the best-fitting straight line in the multiple boundary point is obtained respectively;
Delete the boundary point that deviation is greater than predetermined deviation threshold value;
Singular value decomposition is carried out according to the multiple boundary point, comprising: the coordinate data of remaining boundary point is constituted into side Boundary's dot matrix;Singular value decomposition is carried out to the boundary dot matrix.
Preferably, best-fitting straight line is determined according to the boundary point of segmentation and its corresponding fitting a straight line, comprising:
Step A carries out straight line fitting according to the boundary point of first segment, obtains initial fitting straight line;
Step B calculates separately the deviation of each boundary point and the initial fitting straight line in the multiple boundary point, and Calculate the boundary point number that deviation is less than or equal to the predetermined deviation threshold value;
Step C, the size of the boundary point number and predetermined number;
Step D, if the boundary point number is more than the predetermined number, it is determined that current straight line is straight as best fit Line;
Step E is carried out if the boundary point number is not above the predetermined number according to next section boundary point Straight line fitting executes step B, the boundary point of predetermined number is met until finding using obtained straight line as initial fitting straight line;
Step F, if carrying out initial fitting boundary point number calculated according to each segment boundary point is not above institute State predetermined number, it is determined that straight line corresponding to maximum boundary point number is as best-fitting straight line.
Preferably, it is calculated using the following equation the deviation D of boundary point and straight line:
D=| kxi+b-yi|,
Wherein, linear equation y=kx+b, k and b are the constant of straight line, k ≠ 0;The coordinate of boundary point i is (xi,yi)。
Second aspect, the embodiment of the invention also provides a kind of image boundary determining devices, comprising:
Border points extraction module extracts described image in multiple boundary points of the side for being directed to every side of image;
Singular value decomposition module obtains singular value for carrying out singular value decomposition according to the multiple boundary point;
Singular value adjusts module, for being adjusted according to preset threshold to the singular value;
Boundary point reconstructed module, for reconstructing boundary point using singular value adjusted;
Boundary determining module determines described image in the side for carrying out straight line fitting according to the boundary point after reconstruct Boundary.
The third aspect, the embodiment of the invention also provides a kind of terminal, the terminal includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes that the image boundary as described in any embodiment of that present invention determines method.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes that the image boundary as described in any embodiment of that present invention determines method when the program is executed by processor.
The present invention adjusts singular value by carrying out singular value decomposition to boundary point, using preset threshold, then utilizes adjustment Singular value afterwards reconstructs boundary point, can exclude interference of the abnormal point (or noise spot) to straight line fitting in boundary point, improves The precision of straight line fitting is conducive to subsequent image procossing and image recognition mistake so that the image boundary determined is more accurate Journey.
Detailed description of the invention
Fig. 1 is the flow chart that the image boundary that the embodiment of the present invention one provides determines method;
Fig. 2 is the boundary point and its fitting a straight line schematic diagram of the prior art;
Fig. 3 is the reconstruct boundary point and its fitting a straight line schematic diagram that the embodiment of the present invention one provides;
Fig. 4 is the flow chart that image boundary provided by Embodiment 2 of the present invention determines method;
Fig. 5 is the flow chart of determining best-fitting straight line provided by Embodiment 2 of the present invention;
Fig. 6 is the structural block diagram for the image boundary determining device that the embodiment of the present invention three provides;
Fig. 7 is the structural schematic diagram for the terminal that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart that the image boundary that the embodiment of the present invention one provides determines method, and the present embodiment is applicable to really The case where determining image boundary, is particularly suitable for straight border and there is the image of abnormal point on boundary, for example, triangle, rectangle, polygon The image of the shapes such as shape, specifically, can be adapted for the boundary for determining banknote image in banknote image identification process.This method can To be executed by image boundary determining device, such as the terminal with calculation processing function.As shown in Figure 1, this method is specifically wrapped Include following steps:
Step 110, for every side of image, image is extracted in multiple boundary points of the side.
Wherein, existing method can be used in the method for extracting sharp point, and the invention does not limit this.Example Such as, it scans for line by line or by column, for extracting image left border point, the midpoint in image vertical direction is found, from a left side Start to scan to right, find the left border point of the row, moves fixed line number (such as 4 rows) downward or upward, find the row Left border point, is further continued for moving, the left border point until finding preset number, such as 40 boundary points.Wherein it is possible to logical The gray-value variation for crossing pixel and its surrounding pixel point determines that the pixel is boundary point, because general pattern background is The boundary of black, image boundary and background is more obvious.
Step 120, singular value decomposition is carried out according to the multiple boundary point, obtains singular value.
Wherein, carrying out singular value decomposition according to the multiple boundary point can be the coordinate data of the multiple boundary point It is configured to boundary dot matrix, singular value decomposition then is carried out to the boundary dot matrix.The coordinate of boundary point is (xi,yi), i=1, 2 ..., N, N indicate boundary point number.The mode of tectonic boundary dot matrix is as follows: (1) line number of boundary dot matrix can be side Boundary's point number, columns can be 2 (i.e. two-dimensional coordinates), that is to say, that and the first column data is the abscissa of each boundary point in matrix, Second column data is the ordinate of each boundary point;Alternatively, the line number of (2) boundary dot matrix is 2 (i.e. two-dimensional coordinates), columns is side Boundary's point number, that is to say, that the first row data are the abscissas of each boundary point in matrix, and the second row data are the vertical of each boundary point Coordinate.
Singular value decomposition formula are as follows: A=U ∑ V', U are m × m rank unitary matrice, and ∑ is positive semidefinite m × n rank diagonal matrix, V' It is n × n rank unitary matrice, the transposition of V' representing matrix V.Element ∑ on ∑ diagonal lineiiThe as singular value of matrix A.Singular value Decompose specific calculating process be it is known to a person skilled in the art, the present invention to this without be described in detail.
Step 130, singular value is adjusted according to preset threshold.
Wherein, for same image, preset threshold can be by great amount of samples experiment choose one it is more appropriate Value.A large amount of singular values are obtained specifically, can test by sample, then choose a suitable value according to these singular values As preset threshold, for example, 1000 singular values are obtained by 500 banknote image samples for banknote image, it can be this A little singular values are divided into two classes (for example classifying by K arest neighbors (K-NearestNeighbor, abbreviation KNN) sorting algorithm), The center for calculating every class takes the mean value at two class centers as preset threshold.
Step 140, boundary point is reconstructed using singular value adjusted.
Wherein, for singular value decomposition formula, this step is sought in turn using singular value adjusted as known conditions Boundary dot matrix, and then the coordinate data of the boundary point after available reconstruct.If boundary point is substantially distributed in straight line Near, it will appear a biggish value and a lesser value after singular value decomposition.The size of singular value can reflect out original The significance level of corresponding part in matrix goes forward side by side row matrix data reconstruction by adjusting singular value, can exclude original matrix In noise data.
Step 150, straight line fitting is carried out according to the boundary point after reconstruct, determines image on the boundary of the side.
Wherein it is possible to using existing line fitting method, for example, using the most common least square method to reconstruct after Boundary point carries out straight line fitting, it is of course also possible to use other line fitting methods.Being fitted obtained straight line is image side Boundary.
This method is directed to every side of image, the boundary that above-mentioned steps determine the side is performed both by, it is hereby achieved that the figure As the boundary of all sides.
The technical solution of the present embodiment adjusts singular value using preset threshold by carrying out singular value decomposition to boundary point, Then boundary point is reconstructed using singular value adjusted, the abnormal point (or noise spot) in boundary point can be excluded to straight line fitting Interference, improve the precision of straight line fitting so that determine image boundary it is more accurate, be conducive to subsequent image procossing and Image recognition processes.
Based on the above technical solution, it is preferred that singular value can be adjusted by following steps: be compared respectively The size of more each singular value and preset threshold;If singular value is less than preset threshold, which is adjusted to 0.Singular value Less than preset threshold, indicate that the singular value corresponding part importance in original matrix is not high, it may be possible to which abnormal point will be less than The singular value of preset threshold is adjusted to 0, is reconstructed by boundary point, can exclude the noise data in original matrix.
It preferably, may include: to utilize singular value decomposition formula and adjustment using singular value adjusted reconstruct boundary point Singular value afterwards calculates new boundary point.Specifically, the matrix that singular value adjusted is constituted is ∑1, utilize formula A1=U ∑1V' seeks new boundary point matrix A1, according to matrix A1It is known that the coordinate data of wherein each boundary point.It is thus obtained Boundary point can exclude noise jamming.
In addition, before executing the method shown in FIG. 1 using singular value decomposition reconstruct boundary point, it can be first to extraction Boundary point is tentatively pre-processed: first being carried out straight line fitting (least square method can be used) to the boundary point of extraction and is obtained one Straight line excludes the biggish boundary point of deviation using the deviation of point and straight line, completes preliminary abnormal data and exclude, be then based on surplus Under boundary point, using singular value decomposition complete boundary point reconstruct and straight line fitting procedure, to eliminate the interference of abnormal data.
As shown in Fig. 2, being the boundary point and its fitting a straight line schematic diagram of the prior art, wherein horizontal axis is x-axis, longitudinal axis y Axis, linear equation k value shown in Fig. 2 are that 2.0783, b value is 0.01842, and sample point and linear distance difference are 0.50291.Sample Point and linear distance difference are sum of the distance of each boundary point to the straight line.Singular value point is carried out to endpoint data shown in Fig. 2 Solution, obtains singular value 6.0397 and 0.2187, it is seen that first singular value is big more than second, has in data and makes an uproar comprising some Sound, second singular value, which decomposes corresponding part in original matrix, to be ignored.By singular value decomposition reconstruct boundary points According to rear, obtained boundary point and its fitting a straight line schematic diagram is as shown in figure 3, linear equation k value shown in Fig. 3 is 2.0953, b value For 1.4129e-16, sample point and linear distance difference are 1.289e-15, main sample point is remained, noise is eliminated.
Embodiment two
The present embodiment on the basis of the above embodiment 1, is provided and is before step 120 screened to boundary point A kind of preferred embodiment more can accurately exclude the biggish boundary point of all deviations.As shown in figure 4, the present embodiment Image boundary determines that method includes the following steps:
Step 410, for every side of image, image is extracted in multiple boundary points of the side.
Step 420, the multiple boundary point is segmented.
Wherein, specific segmentation can determines according to actual conditions, for example, for coboundary, lower boundary or similar direction Boundary, can be segmented according to X-coordinate value;For the boundary of left margin, right margin or similar direction, can be sat according to Y Scale value is segmented.Segmentation can divide equally, such as 10 boundary points are one section, are divided into 10 sections;It can not also divide equally, such as respectively Section boundary point number is respectively 8,9,10,9 etc..
Step 430, best-fitting straight line is determined according to the boundary point of segmentation and its corresponding fitting a straight line.For example, can be with Respectively to every segment boundary point carry out straight line fitting, using comprising the most straight line of boundary point as best-fitting straight line.
Step 440, the deviation of each boundary point and best-fitting straight line in the multiple boundary point is obtained respectively.
Specifically, best-fitting straight line equation can be expressed as the constant that y=kx+b, k and b are straight line, k ≠ 0.For Boundary point (xi,yi), the deviation D:D=that following formula calculates boundary point and straight line can be used | kxi+b-yi|.In practical application In, if step 430 when determining best-fitting straight line, calculates the deviation of boundary point and straight line, then herein can be straight It obtains and takes calculated corresponding data, without recalculating.
Step 450, the boundary point that deviation is greater than predetermined deviation threshold value is deleted.Wherein, predetermined deviation threshold value can basis Actual conditions are configured, for example, being set as 3.Deviation, which is greater than preset threshold, indicates boundary point and best-fitting straight line deviation It is larger, it needs to exclude.
Step 460, the coordinate data of remaining boundary point is constituted into boundary dot matrix, which is carried out unusual Value is decomposed, and singular value is obtained.
Step 470, singular value is adjusted according to preset threshold, reconstructs boundary point using singular value adjusted.Tool Body, reconstruct is the initial boundary point for constituting boundary dot matrix, i.e., multiple sides that above-mentioned remaining boundary point namely extracts Remaining boundary point after the biggish boundary point of deviation is deleted in boundary's point.
Step 480, straight line fitting is carried out according to the boundary point after reconstruct, determines image on the boundary of the side.
Then the present embodiment is excluded inclined with best-fitting straight line by carrying out being segmented determining best-fitting straight line to boundary point The biggish boundary point of difference, more can accurately exclude these interference to edge fitting, improve subsequent determining image boundary Precision;And boundary point reconstruct is carried out using singular value decomposition, the precision on final fitting boundary can be further increased.
Preferably, as shown in figure 5, step 430 can determine as follows best-fitting straight line:
Step 510, straight line fitting is carried out according to the boundary point of first segment, obtains initial fitting straight line.
Wherein, each section of serial number can be is ranked up from small to large (or from big to small) according to X-coordinate value or Y-coordinate value , it is also possible to randomly ordered.Straight line fitting can use least square method or other methods in this step.This step obtains Linear equation can be expressed as the constant that y=kx+b, k and b are straight line, k ≠ 0.
Step 520, the deviation of each boundary point and the initial fitting straight line in the multiple boundary point is calculated separately, and Calculate the boundary point number that deviation is less than or equal to predetermined deviation threshold value.
In this step, if the deviation of boundary point and straight line is less than or equal to predetermined deviation threshold value, it is determined that the boundary On this line, otherwise, it determines the boundary point is not on this line, deviation is larger for point.For boundary point (xi,yi), can be used as Lower formula calculates its deviation D:D=with straight line | kxi+b-yi|。
Step 530, compare the size of boundary point number and predetermined number.Wherein, predetermined number can be according to the actual situation It is configured, for example, it may be 3/4ths of total boundary point number.
Step 540, if boundary point number is more than predetermined number, it is determined that current straight line is calculated as best-fitting straight line Method terminates.
Step 550, if boundary point number is not above predetermined number, it is quasi- that straight line is carried out according to next section boundary point It closes, using obtained straight line as initial fitting straight line, then returnes to step 520 statistic bias value less than or equal to predetermined deviation The boundary point number of threshold value, the boundary point of predetermined number is met until finding, using its corresponding straight line as best-fitting straight line.
Step 560, it is not above if carrying out initial fitting boundary point number calculated according to each segment boundary point Predetermined number, it is determined that straight line corresponding to maximum boundary point number is as best-fitting straight line.For example, the boundary point one extracted 10 sections are divided into, according to above-mentioned steps 510 to 550, this 10 sections calculated boundary point numbers are not above predetermined number, then Determine straight line corresponding to wherein maximum boundary point number as best-fitting straight line.
This preferred embodiment gives the step of determining best-fitting straight line, by being segmented to boundary point, according to Piecewise fitting straight line, and best-fitting straight line therein is found out according to the deviation of boundary point and straight line, method is simple and reliable, is easy to It realizes.
In addition it is also possible to determine best-fitting straight line using following steps:
(1) straight line fitting is carried out to each segment boundary point respectively, obtains corresponding fitting a straight line.
For example, boundary point one is divided into j sections, then corresponding j fitting a straight line is obtained.Straight line fitting can be adopted in this step With least square method or other methods.
(2) it is directed to each fitting a straight line y=kjx+bj, calculate separately the deviation of each boundary point Yu the fitting a straight line Dji=| kjxi+bj-yi|, and calculate fitting a straight line lower deviation value DjiLess than or equal to the boundary point number of predetermined deviation threshold value.
Wherein, j indicates the serial number of fitting a straight line, kjAnd bjIt is the constant of fitting a straight line j, kj≠0;I indicates boundary point Serial number, the coordinate of boundary point i are (xi,yi);DjiIndicate the deviation of boundary point i and fitting a straight line j.Likewise, predetermined deviation Threshold value can be configured according to the actual situation, for example, being set as 3.
(3) judge whether the corresponding boundary point number of each fitting a straight line is more than predetermined number.Wherein, predetermined number can root It is configured according to actual conditions, for example, it may be 3/4ths of total boundary point number.
(4) if boundary point number is more than predetermined number, it is determined that fitting a straight line corresponding to the boundary point number is most Good fitting a straight line.Specifically, if it exceeds predetermined number has multiple groups, it is determined that fitting corresponding to maximum boundary point number is straight Line is best-fitting straight line;If there is multiple maximum boundary point numbers, then straight line fitting is carried out according to these boundary points, will be fitted As a result it is used as best-fitting straight line.
(5) if being not above predetermined number according to each fitting a straight line boundary point number calculated, it is determined that Fitting a straight line corresponding to maximum boundary point number is best-fitting straight line.
Embodiment three
A kind of image boundary determining device is present embodiments provided, can be used to implement described in above-described embodiment one and two Image boundary determines method.As shown in fig. 6, the device includes: border points extraction module 610, singular value decomposition module 620, surprise Different value adjustment module 630, boundary point reconstructed module 640 and boundary determining module 650.
Border points extraction module 610 extracts image in multiple boundary points of the side for being directed to every side of image;
Singular value decomposition module 620 obtains singular value for carrying out singular value decomposition according to the multiple boundary point;
Singular value adjusts module 630, for being adjusted according to preset threshold to singular value;
Boundary point reconstructed module 640, for reconstructing boundary point using singular value adjusted;
Boundary determining module 650 determines image on the side of the side for carrying out straight line fitting according to the boundary point after reconstruct Boundary.
The technical solution of the present embodiment adjusts singular value using preset threshold by carrying out singular value decomposition to boundary point, Then boundary point is reconstructed using singular value adjusted, the abnormal point (or noise spot) in boundary point can be excluded to straight line fitting Interference, improve the precision of straight line fitting so that determine image boundary it is more accurate, be conducive to subsequent image procossing and Image recognition processes.
Preferably, singular value adjustment module 630 may include: singular value comparing unit, each unusual for being respectively compared The size of value and preset threshold;Singular value adjustment unit is used in the case where singular value is less than preset threshold, by the singular value It is adjusted to 0.
Preferably, boundary point reconstructed module 640 is specifically used for utilizing singular value decomposition formula and singular value adjusted, meter New boundary point.
Singular value decomposition module 620 is specifically used for: the coordinate data of the multiple boundary point is constituted boundary dot matrix;It is right The boundary dot matrix carries out singular value decomposition.
Boundary determining module 650 specifically can be used for carrying out straight line to the boundary point after reconstruct using least square method quasi- It closes.
Preferably, above-mentioned apparatus can also include:
Boundary point segmentation module, for being segmented to the multiple boundary point;
Best straight line determining module, for determining that best fit is straight according to the boundary point and its corresponding fitting a straight line of segmentation Line;
Deviation obtains module, straight for obtaining each boundary point and the best fit in the multiple boundary point respectively The deviation of line;
Boundary point removing module, the boundary point for being greater than predetermined deviation threshold value for deleting deviation.
On the basis of the scheme of the above-mentioned biggish boundary point of exclusion deviation, singular value decomposition module 620 is specifically used for: will The coordinate data of remaining boundary point constitutes boundary dot matrix;Singular value decomposition is carried out to the boundary dot matrix.
Best straight line determining module is specifically used for executing following steps:
Step A carries out straight line fitting according to the boundary point of first segment, obtains initial fitting straight line;
Step B calculates separately the deviation of each boundary point and the initial fitting straight line in the multiple boundary point, and Calculate the boundary point number that deviation is less than or equal to the predetermined deviation threshold value;
Step C, the size of the boundary point number and predetermined number;
Step D, if the boundary point number is more than the predetermined number, it is determined that current straight line is straight as best fit Line;
Step E is carried out if the boundary point number is not above the predetermined number according to next section boundary point Straight line fitting executes step B, the boundary point of predetermined number is met until finding using obtained straight line as initial fitting straight line;
Step F, if carrying out initial fitting boundary point number calculated according to each segment boundary point is not above institute State predetermined number, it is determined that straight line corresponding to maximum boundary point number is as best-fitting straight line.
Preferably, best straight line determining module is calculated using the following equation the deviation D of boundary point and straight line:
D=| kxi+b-yi|,
Wherein, linear equation y=kx+b, k and b are the constant of straight line, k ≠ 0;The coordinate of boundary point i is (xi,yi)。
Figure provided by any embodiment of the invention can be performed in image boundary determining device provided by the embodiment of the present invention As boundary determining method, have the corresponding functional module of execution method and beneficial effect.
Example IV
Fig. 7 is the structural schematic diagram for the terminal that the embodiment of the present invention four provides, as shown in fig. 7, the terminal includes: processor 710, memory 720, input unit 730 and output device 740.The quantity of processor 710 can be one or more in terminal, In Fig. 7 by taking a processor 710 as an example;Processor 710, memory 720, input unit 730 and output device 740 in terminal It can be connected by bus or other modes, in Fig. 7 for being connected by bus.
Memory 720 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, as the image boundary in the embodiment of the present invention determines the corresponding program instruction/module of method (for example, image side Border points extraction module 610, singular value decomposition module 620, singular value in boundary's determining device adjust module 630, boundary point weight Structure module 640 and boundary determining module 650).Processor 710 is by running the software program being stored in memory 720, instruction And module realizes that above-mentioned image boundary determines method thereby executing the various function application and data processing of terminal.
Memory 720 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 720 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 720 can be into one Step includes the memory remotely located relative to processor 710, these remote memories can pass through network connection to terminal.On The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 730 can be used for receiving the number or character information of input, and generate with the user setting of terminal with And the related key signals input of function control.Output device 740 may include that display screen etc. shows equipment, for example, display image.
Embodiment five
The embodiment of the present invention five also provides a kind of computer readable storage medium, is stored thereon with computer program (also referred to as For computer executable instructions), method, this method packet are determined for executing a kind of image boundary when which is executed by processor It includes:
For every side of image, image is extracted in multiple boundary points of the side;
Singular value decomposition is carried out according to the multiple boundary point, obtains singular value;
Singular value is adjusted according to preset threshold;
Boundary point is reconstructed using singular value adjusted;
Straight line fitting is carried out according to the boundary point after reconstruct, determines image on the boundary of the side.
Certainly, a kind of computer readable storage medium provided by the embodiment of the present invention, the program stored are not limited to Method operation as described above can also be performed image boundary provided by any embodiment of the invention and determine correlation in method Operation.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, included each unit and module are only in the embodiment of above-mentioned image boundary determining device It is to be divided according to the functional logic, but be not limited to the above division, as long as corresponding functions can be realized;Separately Outside, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of image boundary determines method characterized by comprising
For every side of image, described image is extracted in multiple boundary points of the side;
Singular value decomposition is carried out according to the multiple boundary point, obtains singular value;
The singular value is adjusted according to preset threshold;
Boundary point is reconstructed using singular value adjusted;
Straight line fitting is carried out according to the boundary point after reconstruct, determines described image on the boundary of the side.
2. being wrapped the method according to claim 1, wherein being adjusted according to preset threshold to the singular value It includes:
It is respectively compared the size of each singular value Yu the preset threshold;
If singular value is less than the preset threshold, which is adjusted to 0.
3. the method according to claim 1, wherein reconstructing boundary point using singular value adjusted, comprising:
Using singular value decomposition formula and singular value adjusted, new boundary point is calculated.
4. the method according to claim 1, wherein carrying out singular value decomposition, packet according to the multiple boundary point It includes:
The coordinate data of the multiple boundary point is constituted into boundary dot matrix;
Singular value decomposition is carried out to the boundary dot matrix.
5. the method according to claim 1, wherein according to the multiple boundary point carry out singular value decomposition it Before, the method also includes:
The multiple boundary point is segmented;
Best-fitting straight line is determined according to the boundary point of segmentation and its corresponding fitting a straight line;
The deviation of each boundary point and the best-fitting straight line in the multiple boundary point is obtained respectively;
Delete the boundary point that deviation is greater than predetermined deviation threshold value;
Singular value decomposition is carried out according to the multiple boundary point, comprising: the coordinate data of remaining boundary point is constituted into boundary point Matrix;Singular value decomposition is carried out to the boundary dot matrix.
6. according to the method described in claim 5, it is characterized in that, true according to the boundary point of segmentation and its corresponding fitting a straight line Determine best-fitting straight line, comprising:
Step A carries out straight line fitting according to the boundary point of first segment, obtains initial fitting straight line;
Step B, calculates separately the deviation of each boundary point and the initial fitting straight line in the multiple boundary point, and calculates Deviation is less than or equal to the boundary point number of the predetermined deviation threshold value;
Step C, the size of the boundary point number and predetermined number;
Step D, if the boundary point number is more than the predetermined number, it is determined that current straight line is as best-fitting straight line;
Step E carries out straight line according to next section boundary point if the boundary point number is not above the predetermined number Fitting executes step B, the boundary point of predetermined number is met until finding using obtained straight line as initial fitting straight line;
Step F, if be not above according to each segment boundary point progress initial fitting boundary point number calculated described pre- If number, it is determined that straight line corresponding to maximum boundary point number is as best-fitting straight line.
7. method according to claim 5 or 6, which is characterized in that be calculated using the following equation the inclined of boundary point and straight line Difference D:
D=| kxi+b-yi|,
Wherein, linear equation y=kx+b, k and b are the constant of straight line, k ≠ 0;The coordinate of boundary point i is (xi,yi)。
8. a kind of image boundary determining device characterized by comprising
Border points extraction module extracts described image in multiple boundary points of the side for being directed to every side of image;
Singular value decomposition module obtains singular value for carrying out singular value decomposition according to the multiple boundary point;
Singular value adjusts module, for being adjusted according to preset threshold to the singular value;
Boundary point reconstructed module, for reconstructing boundary point using singular value adjusted;
Boundary determining module determines described image on the boundary of the side for carrying out straight line fitting according to the boundary point after reconstruct.
9. a kind of terminal, which is characterized in that the terminal includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now the image boundary as described in any one of claims 1 to 7 determines method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Realize that the image boundary as described in any one of claims 1 to 7 determines method when execution.
CN201710437879.XA 2017-06-12 2017-06-12 Image boundary determining method and device, terminal and storage medium Active CN109035285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710437879.XA CN109035285B (en) 2017-06-12 2017-06-12 Image boundary determining method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710437879.XA CN109035285B (en) 2017-06-12 2017-06-12 Image boundary determining method and device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109035285A true CN109035285A (en) 2018-12-18
CN109035285B CN109035285B (en) 2021-05-11

Family

ID=64630072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710437879.XA Active CN109035285B (en) 2017-06-12 2017-06-12 Image boundary determining method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109035285B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110182578A (en) * 2019-06-14 2019-08-30 上海洪海实业发展有限公司 A kind of segmentation calculates the method and apparatus and equipment of feeding deviation progress material correction
CN110361717A (en) * 2019-07-31 2019-10-22 苏州玖物互通智能科技有限公司 Laser radar-camera combined calibration target and combined calibration method
CN114459482A (en) * 2021-12-30 2022-05-10 广州极飞科技股份有限公司 Boundary simplifying method, path planning method, device, equipment and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609938A (en) * 2012-01-16 2012-07-25 浙江大学 Method for detecting vanishing points of road based on single image
US8952333B2 (en) * 2009-11-02 2015-02-10 Virginia Tech Intellectual Properties, Inc. Methods for improved single photon emission computed tomography using exact and stable region of interest reconstructions
KR101514152B1 (en) * 2013-11-28 2015-04-21 한양대학교 산학협력단 Method and apparatus for improving image quality using singular value decomposition
US9127998B1 (en) * 2012-09-04 2015-09-08 University Of South Florida Active ultrasonic method of quantifying bolt tightening and loosening
CN105957088A (en) * 2016-05-12 2016-09-21 广东电网有限责任公司云浮供电局 Method and system for monitoring transformer composite insulator sleeve based on computer vision

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8952333B2 (en) * 2009-11-02 2015-02-10 Virginia Tech Intellectual Properties, Inc. Methods for improved single photon emission computed tomography using exact and stable region of interest reconstructions
CN102609938A (en) * 2012-01-16 2012-07-25 浙江大学 Method for detecting vanishing points of road based on single image
US9127998B1 (en) * 2012-09-04 2015-09-08 University Of South Florida Active ultrasonic method of quantifying bolt tightening and loosening
KR101514152B1 (en) * 2013-11-28 2015-04-21 한양대학교 산학협력단 Method and apparatus for improving image quality using singular value decomposition
CN105957088A (en) * 2016-05-12 2016-09-21 广东电网有限责任公司云浮供电局 Method and system for monitoring transformer composite insulator sleeve based on computer vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
潘绍松 等: "增强现实中的直线边缘对象位姿跟踪", 《南京航空航天大学学报》 *
王春哲 等: "基于边缘信息的图像质量评价研究", 《长春大学学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110182578A (en) * 2019-06-14 2019-08-30 上海洪海实业发展有限公司 A kind of segmentation calculates the method and apparatus and equipment of feeding deviation progress material correction
CN110182578B (en) * 2019-06-14 2021-02-02 上海洪海实业发展有限公司 Method, device and equipment for correcting material deviation by calculating material deviation in segmentation mode
CN110361717A (en) * 2019-07-31 2019-10-22 苏州玖物互通智能科技有限公司 Laser radar-camera combined calibration target and combined calibration method
CN110361717B (en) * 2019-07-31 2021-03-12 苏州玖物互通智能科技有限公司 Laser radar-camera combined calibration target and combined calibration method
CN114459482A (en) * 2021-12-30 2022-05-10 广州极飞科技股份有限公司 Boundary simplifying method, path planning method, device, equipment and system
CN114459482B (en) * 2021-12-30 2023-11-21 广州极飞科技股份有限公司 Boundary simplification method, path planning method, device, equipment and system

Also Published As

Publication number Publication date
CN109035285B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN102027488B (en) Fingerprint representation using gradient histograms
EP3047426B1 (en) Feature extraction and matching and template update for biometric authentication
CN109685050B (en) Character recognition method, device, equipment and storage medium
CN110569721A (en) Recognition model training method, image recognition method, device, equipment and medium
CN109492642B (en) License plate recognition method, license plate recognition device, computer equipment and storage medium
CN109840524B (en) Text type recognition method, device, equipment and storage medium
KR20180034529A (en) Lane recognition modeling method, apparatus, storage medium and apparatus, and recognition method, apparatus, storage medium and apparatus
CN112966685B (en) Attack network training method and device for scene text recognition and related equipment
CN110490067B (en) Face recognition method and device based on face posture
CN113723309A (en) Identity recognition method, identity recognition device, equipment and storage medium
CN107871319A (en) Detection method, device, x-ray system and the storage medium in beam-defining clipper region
CN108876776B (en) Classification model generation method, fundus image classification method and device
CN109035285A (en) Image boundary determines method and device, terminal and storage medium
CN102298767A (en) Method and apparatus for generating structure-based ASCII pictures
CN111079626B (en) Living body fingerprint identification method, electronic equipment and computer readable storage medium
US8620034B2 (en) System and method for biometric identification using ultraviolet (UV) image data
DE102018220920A1 (en) An information processing apparatus, biometric authentication method and recording medium having a biometric authentication protocol recorded thereon
CN103745453A (en) Town information extraction method based on Google Earth remote sensing image
CN107220981B (en) Character segmentation method, device, equipment and storage medium
US20230245501A1 (en) Offline handwriting individual recognition system and method based on three-dimensional dynamic features
CN111898408B (en) A fast face recognition method and device
CN111612083A (en) Finger vein identification method, device and equipment
CN114332924B (en) Information processing method, device, electronic device and storage medium
Szymkowski et al. A novel approach to fingerprint identification using method of sectorization
CN105488543B (en) A kind of method and device obtaining identification model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant