CN113642588B - Analysis method for outer edge crawler of planar image object - Google Patents

Analysis method for outer edge crawler of planar image object Download PDF

Info

Publication number
CN113642588B
CN113642588B CN202110916920.8A CN202110916920A CN113642588B CN 113642588 B CN113642588 B CN 113642588B CN 202110916920 A CN202110916920 A CN 202110916920A CN 113642588 B CN113642588 B CN 113642588B
Authority
CN
China
Prior art keywords
point
crawling
pixel
edge
linked list
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.)
Active
Application number
CN202110916920.8A
Other languages
Chinese (zh)
Other versions
CN113642588A (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 Fuge Technology Co ltd
Original Assignee
Shenzhen Fuge Technology Co ltd
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 Fuge Technology Co ltd filed Critical Shenzhen Fuge Technology Co ltd
Priority to CN202110916920.8A priority Critical patent/CN113642588B/en
Publication of CN113642588A publication Critical patent/CN113642588A/en
Application granted granted Critical
Publication of CN113642588B publication Critical patent/CN113642588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Abstract

The invention discloses a planar image object outer edge crawler analysis method, which comprises the following steps: inputting a plane image, and obtaining image data after digital quantization of the plane image; determining 8 crawling heuristic direction angles of right, upper left, lower right; taking one direction of the 8 crawling heuristic direction angles as ray exploration, finding out a bright spot with a first pixel value equal to 1, confirming the spot as a crawling starting point P, recording the position coordinate of the P spot, creating a linked list data structure, and storing the coordinate of the P spot in the first node data of the linked list; and sequentially probing and checking 8 pixels adjacent to the crawling starting point P according to the eight crawling probing direction angles by taking the crawling starting point P as a starting edge pixel point, finding out an adjacent pixel with the pixel value equal to 1, confirming the adjacent pixel as a second edge pixel point Q, and recording the position coordinates of the point Q. The invention can analyze the outer edge of the object in the plane image more effectively.

Description

Analysis method for outer edge crawler of planar image object
Technical Field
The invention relates to a planar image object outer edge crawler analysis method, and belongs to the technical field of planar image object outer edge analysis.
Background
In the process of planar image recognition processing, the edge contour of the outer part of an object in the image is often required to be analyzed to obtain the coordinate vector of the edge of the object, and the image corrosion method is commonly used at present; corroding a pixel of the digital quantized binary image, performing exclusive OR operation with the original image to obtain an edge image of the object, and finally converting pixel coordinates of the edge image into vector data; three problems exist in this approach to obtaining object edges; one is that the inner edge of the hollow area of the object is also mistaken as the outer contour of the object, the other is that the tangential relation of adjacent edge points cannot be obtained, and the other is that the image at the petiole cannot be located and found.
Disclosure of Invention
The invention provides a planar image object outer edge crawler analysis method for overcoming the defects in the prior art.
The invention can be realized by adopting the following technical scheme:
the planar image object outer edge crawler analysis method comprises the following steps:
s1, inputting a planar image, wherein the planar image comprises an object and a background, image data consisting of two pixels of a bright point and a dark point is obtained after the planar image is digitally quantized, the pixel value of the object is set to be equal to 1 and is a bright point, and the pixel value of the background is set to be equal to 0 and is a dark point;
s2, determining 8 crawling heuristic direction angles which are right, upper left, lower right, and the arrangement sequence of the 8 crawling heuristic direction angles is defined as a heuristic rotation sequence;
s3, performing ray exploration in a certain direction of the 8 crawling heuristic direction angles, wherein the exploration adopts a line-by-line mode, firstly, exploring one line along the ray direction from the outer side edge of the plane image, then exploring the adjacent inner side line of the edge, finding out a bright point with a first pixel value equal to 1, which is tangential to an object, of a ray, confirming the point as a crawling starting point P, recording the position coordinate of the point P, creating a linked list data structure, and storing the coordinate of the point P in first node data of a bidirectional linked list;
s4, taking a crawling starting point P as a starting edge pixel point, rotating the ray exploration direction for 5 times by using a specified heuristic rotation sequence, sequentially heuristically checking 8 pixel points adjacent to the crawling starting point P according to the eight crawling heuristic direction angle heuristic rotation sequence directions, finding out the adjacent pixel point with the pixel value equal to 1, confirming the adjacent pixel point as a second edge pixel point Q, recording the position coordinate of the point Q, storing the position coordinate into second node data of a doubly-linked list, simultaneously recording the crawling heuristic direction angle at the moment, storing the crawling heuristic direction angle into first node data of the doubly-linked list, and then rotating the crawling heuristic direction angle for 4 times according to the heuristic rotation sequence, and storing the crawling heuristic direction angle into second node data of the doubly-linked list;
s5, taking a Q point as a new departure edge pixel point, finding a third edge pixel point R according to the step of S4, circularly finding N edge pixel points, finally returning to the crawling starting point P, storing information of one found edge pixel point in one node of the doubly-linked list after each time, wherein the information comprises position coordinates of the pixel point in an image, tangential directions of the edge point, direction angles U of the adjacent pixel point before the small insect crawls into the pixel point, direction angles V of the adjacent pixel point after crawling out of the pixel point, storing crawling heuristic direction angles obtained when returning to the crawling starting point P in first node data of the linked list, storing the crawling heuristic direction angles in the nth node data of the doubly-linked list according to a heuristic rotation sequence for 4 times, discarding the position coordinates without processing, storing a set of all edge pixel points in the linked list to form the outer edge of a first image object, and obtaining a position rectangle of the object in the image in the crawling process.
Preferably, in step S3, a row-by-row searching manner from outside to inside is adopted, a row is firstly searched along a ray direction from the outermost edge of the planar image, if no pixel point with the pixel value equal to 1 is searched, an adjacent inner row of the edge is searched, if no pixel point with the pixel value equal to 1 is still searched, the next inner row search adjacent to the inner row is continuously executed, and the like is performed until the crawling starting point P is searched, and if no pixel point with the pixel value equal to 1 is still found until the edge of the planar image is searched, no object is found in the planar image;
preferably, in step S5, when there is an outer edge of only one pixel width of the object in the image, defining the place of such one pixel width as a petiole region, and using the petiole region pixels as feature points for intelligent image processing and recognition; the small insects climb to pass through the petiole area from the front direction and the back direction, and the pixel information of the petiole area is stored twice in the linked list; according to the characteristic, analyzing the data in the linked list, finding out the point of the repeated coordinates, and locating the petiole area of the object.
Preferably, the planar image object outer edge crawler analysis method further comprises the following steps:
s6, carrying out subsequent search on other objects outside the first object in the plane image to obtain a double-linked list of the outer edges of the other objects and position rectangles of the corresponding objects, storing all the linked lists in one set, and storing all the position rectangles in the other set to finally obtain an edge data double-linked list set and a position rectangle set of all the objects in the image.
Preferably, in step S6, after finding the crawling start point P, continuing to search the pixel point S with the pixel value equal to 1 from the P point line by line according to the direction of ray search, searching the pixel point S, determining whether the pixel point S is within the area surrounded by the existing pixels corresponding to the doubly linked list, if the S point is located within a certain area surrounded by the pixels corresponding to the existing linked list, the S point is not the outer edge point of the new object, and continuing to search along the ray direction; otherwise, if the S point is not located in the area surrounded by the pixels corresponding to any existing linked list, the S point is a crawling start point of another new image object, and the steps S4 and S5 are executed to obtain a doubly linked list of the outer edge of the new image object and a position rectangle where the corresponding image object is located.
Preferably, the step of determining whether the pixel point S is within the area surrounded by the existing pixels corresponding to the doubly linked list is as follows:
SS1, defining a variable C, and setting an initial value as 0;
SS2, acquiring first node data from a doubly linked list of a first image object;
SS3, if the vertical coordinate Y corresponding to the node data is equal to the vertical coordinate of the S point, executing step SS4 to analyze the horizontal coordinate X of the S point, otherwise, executing step SS8;
SS4, if the horizontal coordinate X corresponding to the node data is equal to the horizontal coordinate of the S point, the S point is located on the edge point of the area, and belongs to the case that the S point is located in the area, and the inspection is finished, otherwise, executing step SS5;
SS5, if the horizontal coordinate X corresponding to the node data is smaller than the horizontal coordinate of the S point, executing step SS8, otherwise executing step SS6;
SS6, if the crawling direction angle corresponding to the node data is leftward or rightward, executing a step SS8, otherwise, executing the next step;
SS7, if the crawling direction angle corresponding to the node data has an upward or downward component in the vertical direction, adding 1 to the most C, otherwise, keeping the variable C unchanged, and then executing step SS8;
SS8, moving the linked list pointer to the next node, if the linked list end is not reached, executing step SS3 after obtaining the node data, otherwise executing the next step SS9;
and SS9, if the value of C is odd, judging that the S point is positioned in the area, and if not, judging that the S point is positioned outside the area.
Compared with the prior art, the invention has the beneficial effects that: according to the invention, the identification result is output in the form of a bidirectional linked list, any two adjacent elements in the linked list correspond to two adjacent points on the edge of the object, the operation process simulates the process that a small insect crawls along the edge of the object, the obtained result is not influenced by an internal hollow region, only the vector of the outer edge of the object is obtained, and the tangential direction of any edge can be obtained; the crawler cannot get lost, cannot enter a trap by mistake, and cannot enter a dead path; for each point of the image petiole region, by obtaining edge data in the front tangential direction and the back tangential direction, key characteristic points can be calibrated in intelligent identification application, and the outer edge of an object in a plane image can be more effectively analyzed. In addition, whether the object exists in the image or not and the condition that a plurality of objects exist in the image can be analyzed and identified, and the rectangular area where each object is located is obtained at the same time, so that redundant data can be reduced for subsequent analysis of the object, and the method can be used for analyzing the motion condition of the object.
Drawings
FIG. 1 is a flow chart of the planar image object outer edge crawler analysis of the present invention;
FIG. 2 is an example of the actual direction of crawling of the present invention;
FIG. 3 is an example of a crawling heuristic direction of the present invention.
Detailed Description
The following describes the embodiments of the present invention in detail with reference to the drawings.
Example 1
As shown in fig. 1 to 3, the method for analyzing the outer edge crawler of the planar image object according to the embodiment includes the following steps:
s1, inputting a planar image, wherein the planar image comprises an object and a background, image data consisting of two pixels of a bright point and a dark point is obtained after the planar image is digitally quantized, the pixel value of the object is set to be equal to 1 and is a bright point, and the pixel value of the background is set to be equal to 0 and is a dark point;
s2, determining 8 crawling heuristic direction angles of right, upper left, lower right and lower right, and defining the arrangement sequence of the 8 crawling heuristic direction angles as a heuristic rotation sequence
Defining a crawling actual direction, namely crawling from one pixel at the edge of the object to the pixel at the subsequent edge, wherein the crawling actual direction is clockwise and anticlockwise; in an image area, if an object is present, the bug may crawl from one point to another along the edge of the object; the image area can be of any shape, the object can be of any shape, and the object must be located within the image area and not beyond the image area
As shown in fig. 2, inside the rectangle is an image area in which the hatched portion is an object, and the M point and the N point are two points on the edge of the object, respectively; when a small insect starts from the point M and crawls along the edge of the object in the arrow direction to the point N, if the object is always positioned on the left side of the small insect and the background is positioned on the right side of the small insect, the actual crawling direction is specified to be anticlockwise; otherwise, if the object is always positioned on the right side of the bug and the background is positioned on the left side of the bug, the actual crawling direction is specified to be clockwise.
As shown in FIG. 3, the crawling heuristic direction may be two, one clockwise and the other counter-clockwise. If the adjacent pixel points of the P point are 8, the P point is taken as the center, one circle of surrounding points can have two surrounding directions, one circle passes through the point A, the point B, the point C, the point D, the point E, the point F, the point G and the point H and finally reaches the anticlockwise direction of the point A, and the other circle passes through the point H, the point G, the point F, the point E, the point D, the point C, the point B and the point A and finally reaches the clockwise direction of the point H; defining a crawling heuristic angle to be 8 direction angles corresponding to 8 surrounding adjacent pixels when a P point is taken as a coordinate center; the definition crawling direction angle is 8 direction angles corresponding to the crawling direction angle when the insect climbs from 8 adjacent pixels around the crawling direction angle by taking the point P as the coordinate center.
S3, performing ray exploration in a certain direction of the 8 crawling heuristic direction angles, wherein the exploration adopts a row-by-row mode, firstly, exploring one row along the ray direction from the outer side edge of the plane image, then exploring the adjacent inner side row of the edge, finding out a bright point with a first pixel value equal to 1, which is tangential to the outer edge, of a ray, confirming that the point is a crawling starting point P, recording the position coordinate of the point P, creating a linked list data structure, and storing the coordinate of the point P in first node data of a linked list;
and (3) adopting a line-by-line exploration mode from outside to inside, firstly exploring one line along the ray direction from the outermost edge of the plane image, if no pixel point with the pixel value equal to 1 is searched, exploring the adjacent inner line of the edge, if no pixel point with the pixel value equal to 1 is still searched, continuing to explore the next inner line adjacent to the inner line, and so on until the crawling starting point P is searched, and if no pixel point with the pixel value equal to 1 is still found until the edge of the plane image is explored, judging that no object exists in the plane image.
The crawling start point P must be the tangent point of the search ray to the object, and here the actual direction angle of crawling is opposite to the direction of the search ray; for a crawling process design, if the actual crawling direction is designed to be anticlockwise, the crawling heuristic direction is also anticlockwise; otherwise, if the actual crawling direction is designed to be clockwise, the crawling heuristic direction is also clockwise; in the actual design work, the direction of the starting point search ray is designed according to the design requirement of the crawling actual direction, and when the tangent of the search ray and an object is realized, the direction of the ray at the tangent point is opposite to the crawling actual direction angle at the tangent point.
S4, taking the crawling starting point P as a starting edge pixel point, sequentially probing and checking 8 pixel points adjacent to the crawling starting point P according to the eight crawling probing direction angle directions by using a specified probing rotation sequence, finding out an adjacent pixel point with a pixel value equal to 1, confirming the adjacent pixel point as a second edge pixel point Q, and recording the position coordinates of the point Q;
s5, taking the Q point as a new departure edge pixel point, finding a third edge pixel point R according to the step S4, circularly finding N edge pixel points, and finally returning to the crawling start point P, and storing information of one edge pixel point found each time in a node of a doubly linked list, wherein the information comprises the position coordinate of the pixel point in an image, the tangential direction of the edge point, the direction angle U of the adjacent pixel point before the small insect crawls into the pixel point, and the direction angle V of the adjacent pixel point newly entering after crawling out of the pixel point; the crawling heuristic direction angle obtained when returning to the crawling starting point P is stored in the first node data of the linked list, the crawling heuristic direction angle is stored in the N node data of the double-linked list for 4 times according to the heuristic rotation sequence, the position coordinates are discarded and not processed, the set of all edge pixel points stored in the linked list form the outer edge of the first image object, and the position rectangle of the object in the image is obtained in the crawling process.
The specific process of crawling from the point P to the point Q is that the point P is searched for a first adjacent pixel point with the pixel value equal to 1 by changing the crawling heuristic direction angle by not more than 8 times of sequential rotation according to the crawling heuristic direction, if the pixel point is found, stopping, wherein the found point is the point Q to be crawled, the crawling heuristic direction angle is saved to a linked list node corresponding to the point P as a crawling direction angle crawled by the point P, the crawling direction angle is saved to a linked list node corresponding to the point Q as a crawling direction angle crawled by the point Q, and then the coordinate of the point Q is saved; otherwise, if the crawling heuristic direction angle is changed according to the crawling heuristic direction and is tried to search for 8 times, the fact that the P point has no adjacent edge point is indicated, namely, the object corresponding to the P point only contains one pixel of the P point;
after crawling from the P point to the Q point is completed, searching the adjacent edge point R of the Q point at the Q point by the same method as the P point, continuously repeating the crawling process, and crawling back to the P point along the edge point of the object finally, thereby realizing the function of storing all edge information of the object in the linked list.
Specifically, after the point P is crawled to the point Q, in the process of crawling from the point Q to the next point R, the initial value of the crawling heuristic direction angle from the point Q to the point R is equal to the crawling direction angle crawled by the point R, and the crawling heuristic direction is rotated for 5 times; similarly, the initial value of the crawling heuristic direction angle of other points behind the R point is also equal to the crawling direction angle of the point to be crawled in and rotates for 5 times according to the crawling heuristic direction; since the starting point P of the crawling is not crawled from other edge points, the starting value of the crawling heuristic direction angle of the P point is different, and the starting value of the crawling heuristic direction angle of the P point is equal to 1 rotation of the search ray direction according to the crawling heuristic direction.
Each object in the planar image occupies a space, which can be described by a rectangle, called the position rectangle of the object; since the core goal of analyzing an image is to analyze objects in the image, further intelligent analysis after obtaining edges actually only needs to analyze data within a rectangular range of object positions, without analyzing redundant background data outside the rectangular range of positions; in addition, when analyzing dynamic images, the moving direction and speed of the object can be obtained by analyzing the rectangular change of the position of the same object for two images which are obtained continuously.
By executing edge crawling, the position rectangle of the area occupied by the object can be obtained; crawling an object to obtain a position rectangle;
1. defining a rectangular data structure comprising upper left corner coordinates (X0, Y0) and lower right corner coordinates (X1, Y1) for comparing the coordinate (XT, YT) value of a point T with the value of the rectangular data structure each time a crawl reaches a point T; setting an initial value as; the value of X0 is equal to the image width, the value of X1 is equal to 0, the value of Y0 is equal to the image height, and the value of Y1 is equal to 0;
2. if XT is greater than X1, then X1 is set equal to XT; if XT is less than X0, then X0 is set equal to XT;
3. if YT is greater than Y1, setting Y1 to be equal to YT; if YT is less than Y0, setting Y0 to be equal to YT;
4. the edge crawling is repeatedly performed until the object edge crawling is finished, and the upper left corner coordinates (X0, Y0) and the lower right corner coordinates (X1, Y1) of the rectangular data structure store the rectangle where the object is located.
When an object in an image has an outer edge with only one pixel width, defining the position with the one pixel width as a petiole region, and using the pixels in the petiole region as characteristic points for intelligent processing and identification of the image; the small insects climb to pass through the petiole area from the front direction and the back direction, and the pixel information of the petiole area is stored twice in the linked list; according to the characteristic, analyzing the data in the linked list, finding out the point of the repeated coordinates, and locating the petiole area of the object.
There may be no object, only one object, and multiple objects in the planar image; if the starting point search finds the first object and then performs edge crawling to traverse the outer edge of the first object, then a subsequent search needs to be performed to continue searching for other objects that may exist;
the subsequent searching is to search the pixel point S with the pixel value equal to 1 row by row from the P point according to the direction of ray searching after the starting point P is found by the starting point searching, but to check whether the S point is positioned on the object which has completed crawling after the S point is found; because each crawled object corresponds to a linked list for storing edge data, if the S point is located in an area surrounded by pixels corresponding to the existing linked list, the S point is not the outer edge point of the new object and needs to be searched continuously along the ray direction; otherwise, if the S point is not located in the area surrounded by the pixels corresponding to any existing linked list, the S point is a crawling start point of another new object, and edge crawling needs to be performed to obtain an edge point doubly linked list of the new image object.
The method for detecting whether the S point coordinate is positioned in one area or not by adopting a ray edge intersection direction-finding counting method is an improvement method of the traditional ray edge intersection counting method; the design thinking of the ray edge intersection counting method is that a ray is sent out at the S point and intersected with the edge point, if the number of intersection points is odd, the S point is considered to be in the area, otherwise the S point is not in the area; with this approach, errors occur once the radiation passes exactly through the petiole region; therefore, the method is improved, when the ray intersects with the edge point, the crawling direction angle at the intersecting edge point needs to be judged, and if the crawling direction angle is the same as or opposite to the ray direction, the edge point is not counted; judging whether the intersected edge point is tangent to the ray, if so, not counting the edge point; rays in the horizontal or vertical direction are usually adopted conveniently, and the rays in the horizontal and right direction are taken as an example for analysis, and the specific steps are as follows;
SS1, defining a variable C, and setting an initial value as 0;
SS2, acquiring first node data from a doubly linked list of a first image object;
SS3, if the vertical coordinate Y corresponding to the node data is equal to the vertical coordinate of the S point, executing step SS4 to analyze the horizontal coordinate X of the S point, otherwise, executing step SS8;
SS4, if the horizontal coordinate X corresponding to the node data is equal to the horizontal coordinate of the S point, the S point is located on the edge point of the area, and belongs to the case that the S point is located in the area, and the inspection is finished, otherwise, executing step SS5;
SS5, if the horizontal coordinate X corresponding to the node data is smaller than the horizontal coordinate of the S point, executing step SS8, otherwise executing step SS6;
SS6, if the crawling direction angle corresponding to the node data is leftward or rightward, executing a step SS8, otherwise, executing the next step;
SS7, if the crawling direction angle corresponding to the node data has an upward or downward component in the vertical direction, adding 1 to the most C, otherwise, keeping the variable C unchanged, and then executing step SS8;
SS8, moving the linked list pointer to the next node, if the linked list end is not reached, executing step 3 after obtaining the node data, otherwise executing the next step SS9;
and SS9, if the value of C is odd, judging that the S point is positioned in the area, and if not, judging that the S point is positioned outside the area.
Repeating the subsequent searching and crawling until the whole image is searched line by line along the direction of the searching rays, obtaining all objects in the image, and obtaining a corresponding edge data linked list and a position rectangle of each object through edge crawling; and storing all the linked lists in one set, and storing all the position rectangles in another set to finally obtain the edge data linked list set and the position rectangle set of all the objects in the image, which can be used for further intelligent processing.
The method for identifying the outer edge of the object in the plane image outputs the identification result in the form of a double-linked list, wherein any two adjacent elements in the linked list correspond to two adjacent points on the edge of the object; if a plurality of objects exist in the image, the edge data of each object is identified as a single linked list, and the rectangle of the area where the object is located is obtained; the operation process simulates a process that a small insect crawls along the edge of an object; compared with the traditional edge analysis method, the obtained result is not only influenced by the internal hollow area, but also only the vector of the outer edge of the object can be obtained, and the tangential direction at any edge can be obtained; the crawler cannot get lost, cannot enter a trap by mistake, and cannot enter a dead path; for each point of the image petiole region, key characteristic points can be calibrated in intelligent identification application by acquiring edge data of the front tangential direction and the back tangential direction.
The invention has been described in connection with preferred embodiments, but the invention is not limited to the embodiments disclosed above, but it is intended to cover various modifications, equivalent combinations according to the essence of the invention.

Claims (6)

1. The method for analyzing the crawler on the outer edge of the planar image object is characterized by comprising the following steps of: the method comprises the following steps:
s1, inputting a planar image, wherein the planar image comprises an object and a background, image data consisting of two pixels of a bright point and a dark point is obtained after the planar image is digitally quantized, the pixel value of the object is set to be equal to 1 and is a bright point, and the pixel value of the background is set to be equal to 0 and is a dark point;
s2, determining 8 crawling heuristic direction angles which are right, upper left, lower right, and the arrangement sequence of the 8 crawling heuristic direction angles is defined as a heuristic rotation sequence;
s3, performing ray exploration in a certain direction of the 8 crawling heuristic direction angles, wherein the exploration adopts a line-by-line mode, firstly, exploring one line along the ray direction from the outer side edge of the plane image, then exploring the adjacent inner side line of the edge, finding out a bright point with a first pixel value equal to 1, which is tangential to an object, of a ray, confirming the point as a crawling starting point P, recording the position coordinate of the point P, creating a linked list data structure, and storing the coordinate of the point P in first node data of a bidirectional linked list;
s4, taking a crawling starting point P as a starting edge pixel point, rotating the ray exploration direction for 5 times by using a specified heuristic rotation sequence, sequentially heuristically checking 8 pixel points adjacent to the crawling starting point P according to the eight crawling heuristic direction angle heuristic rotation sequence directions, finding out the adjacent pixel point with the pixel value equal to 1, confirming the adjacent pixel point as a second edge pixel point Q, recording the position coordinate of the point Q, storing the position coordinate into second node data of a doubly-linked list, simultaneously recording the crawling heuristic direction angle at the moment, storing the crawling heuristic direction angle into first node data of the doubly-linked list, and then rotating the crawling heuristic direction angle for 4 times according to the heuristic rotation sequence, and storing the crawling heuristic direction angle into second node data of the doubly-linked list;
s5, taking a Q point as a new departure edge pixel point, finding a third edge pixel point R according to the step of S4, circularly finding N edge pixel points, finally returning to the crawling starting point P, storing information of one found edge pixel point in one node of the doubly-linked list after each time, wherein the information comprises position coordinates of the pixel point in an image, tangential directions of the edge point, direction angles U of the adjacent pixel point before the small insect crawls into the pixel point, direction angles V of the adjacent pixel point after crawling out of the pixel point, storing crawling heuristic direction angles obtained when returning to the crawling starting point P in first node data of the linked list, storing the crawling heuristic direction angles in the nth node data of the doubly-linked list according to a heuristic rotation sequence for 4 times, discarding the position coordinates without processing, storing a set of all edge pixel points in the linked list to form the outer edge of a first image object, and obtaining a position rectangle of the object in the image in the crawling process.
2. The planar image object outer edge crawler analysis method according to claim 1, wherein: in step S3, a row-by-row searching manner is adopted, a row is firstly searched from the outermost edge of the planar image along the ray direction, if no pixel point with the pixel value equal to 1 is searched, an adjacent inner row of the edge is searched, if no pixel point with the pixel value equal to 1 is still searched, the next inner row search adjacent to the inner row is continuously executed again, and the like until the crawling starting point P is searched, and if no pixel point with the pixel value equal to 1 is still found until the edge of the planar image is searched, no object is judged in the planar image.
3. The planar image object outer edge crawler analysis method according to claim 1 or 2, wherein: in step S5, when there is an outer edge with only one pixel width of the object in the image, defining the position with the one pixel width as a petiole region, and using the petiole region pixel as a feature point for intelligent processing and recognition of the image; the small insects climb to pass through the petiole area from the front direction and the back direction, and the pixel information of the petiole area is stored twice in the linked list; according to the characteristic, analyzing the data in the linked list, finding out the point of the repeated coordinates, and locating the petiole area of the object.
4. The planar image object outer edge crawler analysis method according to claim 1 or 2, wherein: the planar image object outer edge crawler analysis method further comprises the following steps:
s6, carrying out subsequent search on other objects outside the first object in the plane image to obtain a double-linked list of the outer edges of the other objects and position rectangles of the corresponding objects, storing all the linked lists in one set, and storing all the position rectangles in the other set to finally obtain an edge data double-linked list set and a position rectangle set of all the objects in the image.
5. The planar image object outer edge crawler analysis method according to claim 4, wherein: in step S6, after finding the crawling starting point P, continuing to search the pixel points S with the pixel value equal to 1 row by row from the P point according to the direction of ray searching, searching the pixel points S, judging whether the pixel points S are in the area surrounded by the pixels corresponding to the existing doubly linked list, if the S point is located in a certain area surrounded by the pixels corresponding to the existing linked list, the S point is not the outer edge point of the new object, and searching along the ray direction is needed to be continued; otherwise, if the S point is not located in the area surrounded by the pixels corresponding to any existing linked list, the S point is a crawling start point of another new image object, and the steps S4 and S5 are executed to obtain a doubly linked list of the outer edge of the new image object and a position rectangle where the corresponding image object is located.
6. The planar image object outer edge crawler analysis method according to claim 5, wherein: the step of judging whether the pixel point S is in the area surrounded by the corresponding pixels of the existing doubly linked list is as follows:
SS1, defining a variable C, and setting an initial value as 0;
SS2, acquiring first node data from a doubly linked list of a first image object;
SS3, if the vertical coordinate Y corresponding to the node data is equal to the vertical coordinate of the S point, executing step SS4 to analyze the horizontal coordinate X of the S point, otherwise, executing step SS8;
SS4, if the horizontal coordinate X corresponding to the node data is equal to the horizontal coordinate of the S point, the S point is located on the edge point of the area, and belongs to the case that the S point is located in the area, and the inspection is finished, otherwise, executing step SS5;
SS5, if the horizontal coordinate X corresponding to the node data is smaller than the horizontal coordinate of the S point, executing step SS8, otherwise executing step SS6;
SS6, if the crawling direction angle corresponding to the node data is leftward or rightward, executing a step SS8, otherwise, executing the next step;
SS7, if the crawling direction angle corresponding to the node data has an upward or downward component in the vertical direction, adding 1 to the most C, otherwise, keeping the variable C unchanged, and then executing step SS8;
SS8, moving the linked list pointer to the next node, if the linked list end is not reached, executing step SS3 after obtaining the node data, otherwise executing the next step SS9;
and SS9, if the value of C is odd, judging that the S point is positioned in the area, and if not, judging that the S point is positioned outside the area.
CN202110916920.8A 2021-08-11 2021-08-11 Analysis method for outer edge crawler of planar image object Active CN113642588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110916920.8A CN113642588B (en) 2021-08-11 2021-08-11 Analysis method for outer edge crawler of planar image object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110916920.8A CN113642588B (en) 2021-08-11 2021-08-11 Analysis method for outer edge crawler of planar image object

Publications (2)

Publication Number Publication Date
CN113642588A CN113642588A (en) 2021-11-12
CN113642588B true CN113642588B (en) 2023-10-13

Family

ID=78420706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110916920.8A Active CN113642588B (en) 2021-08-11 2021-08-11 Analysis method for outer edge crawler of planar image object

Country Status (1)

Country Link
CN (1) CN113642588B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014063373A1 (en) * 2012-10-23 2014-05-01 青岛海信信芯科技有限公司 Methods for extracting depth map, judging video scenario switching and optimizing edge of depth map
CN108447071A (en) * 2018-03-16 2018-08-24 中国拖集团有限公司 Gear-profile boundary extraction method based on engagement-pixel image Edge track method
CN111192280A (en) * 2019-12-24 2020-05-22 中北大学 Method for detecting optic disc edge based on local feature

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9652543B2 (en) * 2014-12-22 2017-05-16 Microsoft Technology Licensing, Llc Task-oriented presentation of auxiliary content to increase user interaction performance

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014063373A1 (en) * 2012-10-23 2014-05-01 青岛海信信芯科技有限公司 Methods for extracting depth map, judging video scenario switching and optimizing edge of depth map
CN108447071A (en) * 2018-03-16 2018-08-24 中国拖集团有限公司 Gear-profile boundary extraction method based on engagement-pixel image Edge track method
CN111192280A (en) * 2019-12-24 2020-05-22 中北大学 Method for detecting optic disc edge based on local feature

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨国星 ; .冷冲压模具中板料成型的CAE分析.橡塑技术与装备.2015,(第24期),全文. *
郑纪虎 ; 党德玉 ; .基于边缘跟踪方法的肤色区域检测.计算机工程.2012,(第14期),全文. *

Also Published As

Publication number Publication date
CN113642588A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
EP0669593B1 (en) Two-dimensional code recognition method
CN110032998B (en) Method, system, device and storage medium for detecting characters of natural scene picture
US5048096A (en) Bi-tonal image non-text matter removal with run length and connected component analysis
US6868420B2 (en) Method for traversing quadtrees, octrees, and N-dimensional bi-trees
CN110502985B (en) Form identification method and device and form identification equipment
WO2021052283A1 (en) Method for processing three-dimensional point cloud data and computing device
US8571264B2 (en) Method of using structural models for optical recognition
CN109658454A (en) Pose information determination method, related device and storage medium
EP0785522A2 (en) Method and system for detecting a pattern in an image
CN113282905A (en) Login test method and device
Moschini et al. A hybrid shared-memory parallel max-tree algorithm for extreme dynamic-range images
JP2000232299A (en) Method and device for recognizing part
CN113642588B (en) Analysis method for outer edge crawler of planar image object
CN114359383A (en) Image positioning method, device, equipment and storage medium
KR102260556B1 (en) Deep learning-based parking slot detection method and apparatus integrating global and local information
CN111815594A (en) Reinforcing steel bar detection method and related equipment and device
CN113537026B (en) Method, device, equipment and medium for detecting graphic elements in building plan
US11978197B2 (en) Inspection method for inspecting an object and machine vision system
CN112308061B (en) License plate character recognition method and device
JPS59135579A (en) Pattern contour tracing method
US20030185431A1 (en) Method and system for golden template image extraction
CN113392455A (en) House type graph scale detection method and device based on deep learning and electronic equipment
Stilla et al. Structural 3D-analysis of aerial images with a blackboard-based production system
CN117671677B (en) Fluorescent microarray identification analysis method and system
CN111368847B (en) Character recognition method and device, computer equipment and storage medium

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