CN116664527A - Method, device and medium for determining shape of region - Google Patents

Method, device and medium for determining shape of region Download PDF

Info

Publication number
CN116664527A
CN116664527A CN202310652439.1A CN202310652439A CN116664527A CN 116664527 A CN116664527 A CN 116664527A CN 202310652439 A CN202310652439 A CN 202310652439A CN 116664527 A CN116664527 A CN 116664527A
Authority
CN
China
Prior art keywords
shape
determining
area
rectangle
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310652439.1A
Other languages
Chinese (zh)
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.)
Sungrow Renewables Development Co Ltd
Original Assignee
Sungrow Renewables Development 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 Sungrow Renewables Development Co Ltd filed Critical Sungrow Renewables Development Co Ltd
Priority to CN202310652439.1A priority Critical patent/CN116664527A/en
Publication of CN116664527A publication Critical patent/CN116664527A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a method, equipment and medium for determining a region shape, and belongs to the technical field of computer vision processing. In the method, firstly, available land parcels in an area image to be judged are extracted, then preliminary shape judgment of the available land parcels is carried out based on the minimum circumscribed rectangle, the area shape of the available land parcels is determined, step-in shape judgment based on segmentation processing is carried out on irregular patterns in the area shape, and the area shape of the irregular patterns is determined. Therefore, compared with a region identification method which can only be adapted to a specific image, the method is simple, efficient and high in adaptability based on preliminary shape judgment of the minimum circumscribed rectangle, and compared with the region shape accurate identification difficulty increased in generalized Hough transformation, the method can accurately conduct further shape determination on the irregular graph based on step-in shape judgment of segmentation processing.

Description

Method, device and medium for determining shape of region
Technical Field
The present application relates to the field of computer vision processing, and in particular, to a method for determining a shape of an area, an apparatus for determining a shape of an area, and a computer readable storage medium.
Background
In the field of computer vision processing, geometric shapes in natural and non-natural objects have important significance in accurately detecting the geometric shapes in digital images, and have extremely wide application in engineering drawing vectorization, image segmentation, robot vision and object positioning.
At present, (1) a graph for segmentation detection based on boundary tracking and curves is limited to straight lines, circles and ellipses in a digital image, and the method is too single and cannot be well adapted to certain specific image segmentation scenes; (2) The generalized Hough transformation can generate boundary line break points and image deformation after the graph is detected, and the difficulty is increased for accurately determining the shape of the region.
Disclosure of Invention
The main object of the present application is to provide a method for determining a shape of an area, an apparatus for determining a shape of an area, and a computer-readable storage medium, which aim to solve the technical problem that it is difficult to accurately identify a shape of an area.
To achieve the above object, the present application provides a method for determining a shape of a region, the method comprising:
acquiring an area image to be judged, and extracting available land parcels in the area image to be judged;
determining the shape of the area of the available land block by judging the preliminary shape of the available land block based on the minimum circumscribed rectangle;
and judging the step-in shape of the irregular graph in the area shape based on the segmentation process, and determining the area shape of the irregular graph.
Illustratively, the step of extracting the available land block in the to-be-determined area image includes:
determining a pixel value average value of the region image to be judged, and carrying out binarization processing on the region image to be judged based on the pixel value average value to obtain a binarized region image;
and determining a connected region of the binarized region image, and extracting the available land block based on gradient or edge direction histogram of each pixel point in the connected region.
Illustratively, the step of determining the area shape of the available land parcel based on the preliminary shape judgment of the available land parcel by the minimum bounding rectangle includes:
determining a minimum circumscribed rectangle of the available land block;
and determining the shape of the area of the available land block based on the shape parameters of the available land block and the circumscribed rectangle.
Illustratively, the step of determining the minimum bounding rectangle of the available parcel comprises:
extracting edge coordinates of the available land block, and constructing a pending rectangle surrounding the edge coordinates;
determining an area comparison result between a first area of the available land and a second area of the rectangle to be determined;
determining the inclusion relation between the point location coordinates of the available land and the area of the undetermined rectangle;
and determining the minimum circumscribed rectangle of the available land block based on the area comparison result and the inclusion relation.
Illustratively, the step of determining the minimum bounding rectangle of the available parcel based on the area comparison result and the inclusion relationship includes:
if the first area is larger than the second area, moving the center of the undetermined rectangle to the center of the available land block;
and if the point location coordinates of the available land block are all on the edge or inside of the undetermined rectangle, determining the undetermined rectangle as the minimum circumscribed rectangle of the available land block.
Illustratively, the step of determining the minimum bounding rectangle of the available parcel based on the area comparison result and the inclusion relationship includes:
reconstructing the pending rectangle if the first area is less than or equal to the second area until the first area is greater than the second area;
if the point location coordinates of the available land block are not located on the edge or the inside of the rectangle to be determined, rotating the rectangle to be determined, and moving a preset angle and a preset distance to the center of the available land block until the point location coordinates of the available land block are located on the edge or the inside of the rectangle to be determined.
Illustratively, the step of determining the shape of the area of the available parcel based on the shape parameters of the available parcel and the bounding rectangle includes:
and determining that the shape of the area of the available land is a regular pattern or an irregular pattern based on the ratio of the areas in the shape parameters of the available land and the circumscribed rectangle and the length and the width of the circumscribed rectangle.
Illustratively, the step of determining the area shape of the irregular pattern by performing step-in shape judgment based on segmentation processing on the irregular pattern in the area shape includes:
dividing the irregular graph in the area shape to obtain a plurality of local areas;
determining a local reference point of the local area;
determining a region shape of the irregular pattern based on the local reference points of each of the local regions.
Illustratively, the step of determining the local reference point of the local area includes:
determining boundary points of the local area, determining peripheral areas of the boundary points, and determining edge points in the peripheral areas;
a local reference point of the local area is determined based on local maximum coordinates of the edge point.
Illustratively, after the step of determining the area shape of the irregular pattern by performing step-in shape judgment based on the segmentation process on the irregular pattern in the area shape, the step of determining the area shape of the irregular pattern includes:
a wavelet transform descriptor of the region shape is determined, and the region shape is retrieved based on the wavelet transform descriptor.
The application also provides a device for determining the shape of an area, which comprises:
the extraction module is used for obtaining an area image to be judged and extracting available land parcels in the area image to be judged;
the preliminary shape judging module is used for judging the preliminary shape of the available land block based on the minimum circumscribed rectangle and determining the area shape of the available land block;
and the step-in shape judging module is used for judging the step-in shape of the irregular graph in the area shape based on the segmentation processing and determining the area shape of the irregular graph.
The present application also provides a region shape determining apparatus including: a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method of determining a shape of a region as described above.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of determining a shape of a region as described above.
The embodiment of the application provides a method for determining a region shape, a device for determining the region shape and a computer readable storage medium, wherein a region image to be judged is obtained, and an available land block in the region image to be judged is extracted; determining the shape of the area of the available land block by judging the preliminary shape of the available land block based on the minimum circumscribed rectangle; and judging the step-in shape of the irregular graph in the area shape based on the segmentation process, and determining the area shape of the irregular graph.
In the method, firstly, available land parcels in an area image to be judged are extracted, then preliminary shape judgment of the available land parcels is carried out based on the minimum circumscribed rectangle, the area shape of the available land parcels is determined, step-in shape judgment based on segmentation processing is carried out on irregular patterns in the area shape, and the area shape of the irregular patterns is determined. Therefore, compared with a region identification method which can only be adapted to a specific image, the method is simple, efficient and high in adaptability based on preliminary shape judgment of the minimum circumscribed rectangle, and compared with the region shape accurate identification difficulty increased in generalized Hough transformation, the method can accurately conduct further shape determination on the irregular graph based on step-in shape judgment of segmentation processing.
Drawings
FIG. 1 is a schematic diagram of an operating device of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a flow chart of an embodiment of a method for determining a shape of an area according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a rectangle to be determined according to an embodiment of a method for determining a shape of an area according to an embodiment of the present application;
FIG. 4 is a schematic diagram of determining a minimum bounding rectangle of a usable land according to an embodiment of a method for determining a shape of an area according to an embodiment of the present application;
fig. 5 is a schematic diagram of a device for determining a shape of an area according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, fig. 1 is a schematic diagram of an operating device of a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the operation device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is not limiting of the operating device and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
As shown in fig. 1, an operating system, a data storage module, a network communication module, a user interface module, and a computer program may be included in the memory 1005 as one type of storage medium.
In the operating device shown in fig. 1, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with a user; the processor 1001, the memory 1005 in the operation device of the present application may be provided in an operation device that calls a computer program stored in the memory 1005 through the processor 1001 and performs the following operations:
acquiring an area image to be judged, and extracting available land parcels in the area image to be judged;
determining the shape of the area of the available land block by judging the preliminary shape of the available land block based on the minimum circumscribed rectangle;
and judging the step-in shape of the irregular graph in the area shape based on the segmentation process, and determining the area shape of the irregular graph.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of extracting the available land block in the area image to be judged comprises the following steps:
determining a pixel value average value of the region image to be judged, and carrying out binarization processing on the region image to be judged based on the pixel value average value to obtain a binarized region image;
and determining a connected region of the binarized region image, and extracting the available land block based on gradient or edge direction histogram of each pixel point in the connected region.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the area shape of the available land parcel based on the preliminary shape judgment of the available land parcel based on the minimum bounding rectangle comprises the following steps:
determining a minimum circumscribed rectangle of the available land block;
and determining the shape of the area of the available land block based on the shape parameters of the available land block and the circumscribed rectangle.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the minimum bounding rectangle of the available parcel comprises:
extracting edge coordinates of the available land block, and constructing a pending rectangle surrounding the edge coordinates;
determining an area comparison result between a first area of the available land and a second area of the rectangle to be determined;
determining the inclusion relation between the point location coordinates of the available land and the area of the undetermined rectangle;
and determining the minimum circumscribed rectangle of the available land block based on the area comparison result and the inclusion relation.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the minimum bounding rectangle of the available land parcel based on the area comparison result and the inclusion relationship includes:
if the first area is larger than the second area, moving the center of the undetermined rectangle to the center of the available land block;
and if the point location coordinates of the available land block are all on the edge or inside of the undetermined rectangle, determining the undetermined rectangle as the minimum circumscribed rectangle of the available land block.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the minimum bounding rectangle of the available land parcel based on the area comparison result and the inclusion relationship includes:
reconstructing the pending rectangle if the first area is less than or equal to the second area until the first area is greater than the second area;
if the point location coordinates of the available land block are not located on the edge or the inside of the rectangle to be determined, rotating the rectangle to be determined, and moving a preset angle and a preset distance to the center of the available land block until the point location coordinates of the available land block are located on the edge or the inside of the rectangle to be determined.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the shape of the area of the available parcel based on the shape parameters of the available parcel and the circumscribing rectangle, comprises:
and determining that the shape of the area of the available land is a regular pattern or an irregular pattern based on the ratio of the areas in the shape parameters of the available land and the circumscribed rectangle and the length and the width of the circumscribed rectangle.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the area shape of the irregular graph by performing step-in shape judgment based on segmentation processing on the irregular graph in the area shape comprises the following steps:
dividing the irregular graph in the area shape to obtain a plurality of local areas;
determining a local reference point of the local area;
determining a region shape of the irregular pattern based on the local reference points of each of the local regions.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining a local reference point of the local area comprises:
determining boundary points of the local area, determining peripheral areas of the boundary points, and determining edge points in the peripheral areas;
a local reference point of the local area is determined based on local maximum coordinates of the edge point.
In an embodiment, the processor 1001 may call a computer program stored in the memory 1005, and further perform the following operations:
the step of determining the area shape of the irregular pattern after the step of determining the area shape of the irregular pattern based on the step-in shape judgment of the segmentation process comprises the steps of:
a wavelet transform descriptor of the region shape is determined, and the region shape is retrieved based on the wavelet transform descriptor.
An embodiment of the present application provides a method for determining a shape of a region, referring to fig. 2, in an embodiment of the method for determining a shape of a region, the method includes:
step S10, obtaining an area image to be judged, and extracting available land parcels in the area image to be judged;
in this embodiment, the land block where the area to be determined is located is not limited.
In an embodiment, the region to be judged is a region of available land block of the fan site, and the proposed method for determining the shape of the region is applied to preprocessing of an input source image of a three-dimensional design platform of a wind power plant, can be used for searching and classifying similar shapes, and further improves land utilization rate by combining a site selection rule of the fan site.
Illustratively, the step of extracting the available land block in the to-be-determined area image includes:
determining a pixel value average value of the region image to be judged, and carrying out binarization processing on the region image to be judged based on the pixel value average value to obtain a binarized region image;
and determining a connected region of the binarized region image, and extracting the available land block based on gradient or edge direction histogram of each pixel point in the connected region.
In one embodiment, available land block information of the picture of the planned site area is imported, the average value of all pixel values of the picture is calculated by using the gray level image of the picture of the planned site area, and image binarization segmentation of the picture of the planned site area is realized by using the average value as a threshold value to obtain a binarized area image, wherein RGB values of available land block data sets are (255 ), and RGB values of other land block data sets are (0, 0). The data set refers to a set of all pixel points, each pixel point has an RGB value, and other plots refer to non-available plots, namely, the rest plots except the available plots.
Then the image is divided into small connected areas by using HOG (Histogram of oriented gradients) feature algorithm, then the gradient or edge direction histogram of each pixel point in the connected areas is collected, and the feature descriptors are constructed by combining the histograms to extract the available land parcels with the same color. The foregoing binarization process is equivalent to filtering, but it is also necessary to integrate pixels of the same color, so as to ensure that the pixels can be separated into the same group.
Step S20, judging the preliminary shape of the available land block based on the minimum circumscribed rectangle, and determining the area shape of the available land block;
the method has the advantages that the preliminary shape judgment of the available land parcels is carried out based on the minimum circumscribed rectangle, and the area shape of the available land parcels is determined, so that compared with an area recognition method which can only be adapted to a specific image, the preliminary shape judgment based on the minimum circumscribed rectangle is simple, efficient and high in adaptability.
And step S30, performing step-in shape judgment based on segmentation processing on the irregular graph in the area shapes, and determining the area shapes of the irregular graph.
The step-in shape judgment based on the segmentation processing is carried out on the irregular graph in the area shape, and the area shape of the irregular graph is determined, so that compared with the area shape accurate recognition difficulty increased in the generalized Hough (Hough) transformation, the step-in shape judgment based on the segmentation processing can accurately carry out further shape determination on the irregular graph.
In the embodiment, an area image to be judged is obtained, and an available land block in the area image to be judged is extracted; determining the shape of the area of the available land block by judging the preliminary shape of the available land block based on the minimum circumscribed rectangle; and judging the step-in shape of the irregular graph in the area shape based on the segmentation process, and determining the area shape of the irregular graph.
In this embodiment, firstly, an available land block in an area image to be determined is extracted, then, preliminary shape determination of the available land block is performed based on a minimum circumscribed rectangle, an area shape of the available land block is determined, then, step-in shape determination based on segmentation processing is performed on an irregular pattern in the area shape, and the area shape of the irregular pattern is determined. Therefore, compared with a region identification method which can only be adapted to a specific image, the method is simple, efficient and high in adaptability based on preliminary shape judgment of the minimum circumscribed rectangle, and compared with the region shape accurate identification difficulty increased in generalized Hough transformation, the method can accurately conduct further shape determination on the irregular graph based on step-in shape judgment of segmentation processing.
In another embodiment of the method for determining a shape of a region, the step of determining the shape of the region of the available parcel based on the preliminary shape judgment of the available parcel based on the minimum bounding rectangle includes:
determining a minimum circumscribed rectangle of the available land block;
and determining the shape of the area of the available land block based on the shape parameters of the available land block and the circumscribed rectangle.
In this embodiment, a method of drawing a minimum bounding rectangle of an arbitrary figure is defined.
When the preliminary shape judgment of the available land parcel is carried out based on the minimum circumscribed rectangle, and the area shape of the available land parcel is determined, the minimum circumscribed rectangle of the available land parcel is determined first, and then the area shape of the available land parcel is determined based on the shape parameters of the available land parcel and the circumscribed rectangle. In the present embodiment, the method of determining the minimum bounding rectangle of the available land is not limited, nor is the method of determining the area shape of the available land based on the shape parameters of the available land and the bounding rectangle.
Illustratively, the step of determining the minimum bounding rectangle of the available parcel comprises:
extracting edge coordinates of the available land block, and constructing a pending rectangle surrounding the edge coordinates;
determining an area comparison result between a first area of the available land and a second area of the rectangle to be determined;
determining the inclusion relation between the point location coordinates of the available land and the area of the undetermined rectangle;
and determining the minimum circumscribed rectangle of the available land block based on the area comparison result and the inclusion relation.
In one embodiment, the python shape library is invoked to extract the edge coordinates of the available plots and put them into the edge coordinate point set a, and a pending rectangle that can enclose the edge points is constructed with the edge coordinate point set a. Wherein there may be a plurality of edge coordinates, the number of edge coordinates depending on whether only inflection points or all points need to be considered.
And counting the areas of the available land and the enclosed undetermined rectangle, and comparing the areas to determine and obtain an area comparison result between the first area of the available land and the second area of the undetermined rectangle.
And determining the point location coordinates of the available land and the area of the undetermined rectangle, and judging whether the coordinates of all the available land are on the sides and the inside of the undetermined rectangle to obtain the inclusion relation between the point location coordinates of the available land and the area of the undetermined rectangle.
Finally, a minimum bounding rectangle of the available parcel is determined based on the area comparison result and the inclusion relationship.
Illustratively, the step of determining the minimum bounding rectangle of the available parcel based on the area comparison result and the inclusion relationship includes:
if the first area is larger than the second area, moving the center of the undetermined rectangle to the center of the available land block;
and if the point location coordinates of the available land block are all on the edge or inside of the undetermined rectangle, determining the undetermined rectangle as the minimum circumscribed rectangle of the available land block.
When determining the minimum bounding rectangle of the available land based on the area comparison result and the inclusion relationship, if the first area is larger than the second area, the center of the rectangle to be determined is moved to the center of the available land, and in this embodiment, the method of moving the center of the rectangle to be determined to the center of the available land is not limited, and the method of determining the center of the available land is not limited. If the point location coordinates of the available land block are on the edges or inside of the undetermined rectangle, determining that the undetermined rectangle is the minimum circumscribed rectangle of the available land block, and outputting the minimum circumscribed rectangle.
Illustratively, the step of determining the minimum bounding rectangle of the available parcel based on the area comparison result and the inclusion relationship includes:
reconstructing the pending rectangle if the first area is less than or equal to the second area until the first area is greater than the second area;
if the point location coordinates of the available land block are not located on the edge or the inside of the rectangle to be determined, rotating the rectangle to be determined, and moving a preset angle and a preset distance to the center of the available land block until the point location coordinates of the available land block are located on the edge or the inside of the rectangle to be determined.
Since there may be a case where points other than edge points protrude outside the rectangle, if the first area of the available land is smaller than or equal to the second area of the pending rectangle, the pending rectangle needs to be reconstructed until the first area is larger than the second area.
For the same reason, if the point location coordinates of the available plots are not all located on or in the edges of the rectangle to be determined, the rectangle to be determined is rotated and moved to the center of the available plot by a preset angle and a preset distance until the point location coordinates of the available plots are all located on or in the edges of the rectangle to be determined. In one embodiment, the rectangle to be determined is rotated 180 ° about its center and moved a fixed angle and distance d toward the center of the available plot after each rotation.
Illustratively, the step of determining the shape of the area of the available parcel based on the shape parameters of the available parcel and the bounding rectangle includes:
and determining that the shape of the area of the available land is a regular pattern or an irregular pattern based on the ratio of the areas in the shape parameters of the available land and the circumscribed rectangle and the length and the width of the circumscribed rectangle.
In this embodiment, after calculation by a formula, the size relationship between the parameter and the reference pattern is determined, and the similarity between the detection pattern and the rule pattern is determined. When determining the shape of the area of the available land based on the shape parameters of the available land and the circumscribed rectangle, the shape of the area of the available land may be determined as a regular pattern or an irregular pattern based on the ratio of the areas in the shape parameters of the available land and the circumscribed rectangle, and the length and width of the circumscribed rectangle.
In one embodiment, the shape parameters of the available plots are defined, and the shape of the area of the available plots is determined in combination with the corresponding proportional relation. Firstly, judging the rectangle degree of the available land, and an objective function:A 0 the area is the area of the region, A is the minimum circumscribed rectangular area of the region, the larger probability is rectangular when R=1, and +.>The larger probability is circular; and then judging the body state ratio of the minimum circumscribed rectangle according to the available land parcels, and the objective function: />a and b are the length and width of the smallest circumscribed rectangle of the area, T=1 is square or round, T>1 are elongated patterns, possibly irregular patterns.
In another embodiment of the method for determining a region shape, the step of determining a region shape of an irregular pattern in the region shape by performing step-in shape judgment based on segmentation processing includes:
dividing the irregular graph in the area shape to obtain a plurality of local areas;
determining a local reference point of the local area;
determining a region shape of the irregular pattern based on the local reference points of each of the local regions.
When determining the area shape of the irregular pattern by performing step-in shape judgment based on segmentation processing on the irregular pattern in the area shape, firstly, segmenting the irregular pattern in the area shape to obtain a plurality of local areas, then determining local reference points of the local areas, and finally, determining the area shape of the irregular pattern based on the local reference points of the local areas. Thus, the outline of the entire large irregular pattern is divided into a plurality of small partial areas, and the shape of the entire large outline is determined from the coordinates of the partial reference points of the plurality of small partial areas.
Illustratively, the step of determining the local reference point of the local area includes:
determining boundary points of the local area, determining peripheral areas of the boundary points, and determining edge points in the peripheral areas;
a local reference point of the local area is determined based on local maximum coordinates of the edge point.
When the local reference point of the local area is determined, the peripheral area of the boundary point of the local area and the edge point in the peripheral area are determined, and the local reference point of the local area is determined according to the local maximum coordinates of the edge point.
In one embodiment, a boundary point P (x, y) is first taken on the boundary of the irregular pattern, and a peripheral region of suitable size is taken around the boundary point P, as shown in fig. 3, where the size of the peripheral region is related to the pattern to be identified, and in one embodiment, the peripheral region is a square region with a length of 100 pixels and a width.
Then, a rectangular frame is drawn in the peripheral area, which is required to reflect the local geometric features of the boundary point P and the adjacent point Q (closest edge point) on the curve and the normal direction at the point with respect to the global pattern.
Next, the slope of the line connecting the boundary point P and each point in the vicinity (each edge point in the selected area) is calculated, and the slope value with the largest slope is set as k as the slope of the tangent line at the boundary point P. The direction angle α of the normal line is the arctangent value of the tangential slope at point P, α= (90 ° -arctan).
Then, a vector from the contour point (not the edge point, which is a point inside the aforementioned region of suitable size) to the reference point (boundary point P) is calculated from the normal direction, the relationship is as follows:
(N 1 ,r1 1 …r1 a1 ,θ1 1 …θ1 a1 )
(N 2 ,r2 1 …r2 a1 ,θ2 1 …θ2 a1 )
(N i ,ri 1 …ri a1 ,θl 1 …θi a1 )
in the above relation, there are straight line distance and included angle between two points, which are respectively corresponding to r and θ.
Then, when detecting an object, the normal direction N of the point on the contour is determined, and the coordinates of the contour point can be calculated according to the following formula:
finally, parameters p and q of local maximum values are obtained for the groups A [ p, q ], namely, the coordinates of reference points of the whole contour are determined, namely, a new boundary point p is determined, and the coordinates of the new boundary point p are as follows: the maximum value of parameter p and the maximum value of parameter q are shown in fig. 4. Wherein, the local maximum is exemplified, the value outside the array boundary is infinitesimal, namely A [0] > A [ -1], A [ N-1] > A [ N ], so that the following formalized definition of the local maximum can be obtained: a=one of { a [ i ] |a [ i ] > a [ i-1] and a [ i ] > a [ i+1],0< =i < =n-1 }, a pass is made to the global maximum, which is obviously the local maximum.
In another embodiment of the method for determining a shape of a region, the step of determining the shape of the region of the irregular pattern by performing step-in shape judgment based on segmentation processing on the irregular pattern in the shape of the region includes:
a wavelet transform descriptor of the region shape is determined, and the region shape is retrieved based on the wavelet transform descriptor.
After the area shape of the area image to be judged is determined, the shape of the image is classified, and the general types are regular images and irregular images, wherein the regular images can be subdivided into rectangles, triangles, circles and the like. In addition, wavelet transformation descriptors can be applied to quantitatively describe boundaries, and the basis is that boundary coordinates are regarded as a complex sequence, wavelet transformation is carried out on the complex sequence, and multi-level analysis is carried out to realize fine contour so as to realize pattern shape retrieval. The wavelet transformation process is divided into splitting, predicting and updating processes, so that a multi-resolution curve is constructed, the resolution of the curve is reduced by continuously extracting local correction vectors of the curve defined as wavelet coefficients, control vertexes of the curve are finally obtained, and the curve is reconstructed within an error tolerance range through the smaller control vertexes and the wavelet correction vectors.
Referring to fig. 5, in addition, an embodiment of the present application further provides a device for determining a shape of a region, where the device for determining a shape of a region includes:
the extraction module M1 is used for obtaining an area image to be judged and extracting available land parcels in the area image to be judged;
the preliminary shape judging module M2 is used for judging the preliminary shape of the available land block based on the minimum circumscribed rectangle and determining the area shape of the available land block;
and the step-in shape judging module M3 is used for judging the step-in shape of the irregular graph in the area shape based on the segmentation process and determining the area shape of the irregular graph.
Illustratively, the acquisition extraction module is further configured to:
determining a pixel value average value of the region image to be judged, and carrying out binarization processing on the region image to be judged based on the pixel value average value to obtain a binarized region image;
and determining a connected region of the binarized region image, and extracting the available land block based on gradient or edge direction histogram of each pixel point in the connected region.
Illustratively, the preliminary shape determination module is further configured to:
determining a minimum circumscribed rectangle of the available land block;
and determining the shape of the area of the available land block based on the shape parameters of the available land block and the circumscribed rectangle.
Illustratively, the preliminary shape determination module is further configured to:
extracting edge coordinates of the available land block, and constructing a pending rectangle surrounding the edge coordinates;
determining an area comparison result between a first area of the available land and a second area of the rectangle to be determined;
determining the inclusion relation between the point location coordinates of the available land and the area of the undetermined rectangle;
and determining the minimum circumscribed rectangle of the available land block based on the area comparison result and the inclusion relation.
Illustratively, the preliminary shape determination module is further configured to:
if the first area is larger than the second area, moving the center of the undetermined rectangle to the center of the available land block;
and if the point location coordinates of the available land block are all on the edge or inside of the undetermined rectangle, determining the undetermined rectangle as the minimum circumscribed rectangle of the available land block.
Illustratively, the preliminary shape determination module is further configured to:
reconstructing the pending rectangle if the first area is less than or equal to the second area until the first area is greater than the second area;
if the point location coordinates of the available land block are not located on the edge or the inside of the rectangle to be determined, rotating the rectangle to be determined, and moving a preset angle and a preset distance to the center of the available land block until the point location coordinates of the available land block are located on the edge or the inside of the rectangle to be determined.
Illustratively, the preliminary shape determination module is further configured to:
and determining that the shape of the area of the available land is a regular pattern or an irregular pattern based on the ratio of the areas in the shape parameters of the available land and the circumscribed rectangle and the length and the width of the circumscribed rectangle.
Illustratively, the step-in shape determining module is further configured to:
dividing the irregular graph in the area shape to obtain a plurality of local areas;
determining a local reference point of the local area;
determining a region shape of the irregular pattern based on the local reference points of each of the local regions.
Illustratively, the step-in shape determining module is further configured to:
determining boundary points of the local area, determining peripheral areas of the boundary points, and determining edge points in the peripheral areas;
a local reference point of the local area is determined based on local maximum coordinates of the edge point.
Illustratively, the determining means of the area shape is further configured to:
after the step of determining the area shape of the irregular pattern by performing step-in shape judgment based on segmentation processing on the irregular pattern in the area shape:
a wavelet transform descriptor of the region shape is determined, and the region shape is retrieved based on the wavelet transform descriptor.
The area shape determining device provided by the application adopts the area shape determining method in the embodiment, so that the technical problem that the area shape is difficult to accurately identify is solved. Compared with the conventional technology, the beneficial effects of the area shape determining device provided by the embodiment of the present application are the same as those of the area shape determining method provided by the above embodiment, and other technical features of the area shape determining device are the same as those disclosed by the method of the above embodiment, which are not described herein.
In addition, an embodiment of the present application further provides a device for determining a shape of a region, where the device for determining a shape of a region includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method of determining a shape of a region as described above.
Furthermore, the embodiment of the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for determining a shape of a region as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the conventional technology in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (12)

1. A method of determining a shape of a region, the method comprising:
acquiring an area image to be judged, and extracting available land parcels in the area image to be judged;
determining the shape of the area of the available land block by judging the preliminary shape of the available land block based on the minimum circumscribed rectangle;
and judging the step-in shape of the irregular graph in the area shape based on the segmentation process, and determining the area shape of the irregular graph.
2. The method of determining a shape of an area according to claim 1, wherein the step of extracting the available land mass in the area image to be judged comprises:
determining a pixel value average value of the region image to be judged, and carrying out binarization processing on the region image to be judged based on the pixel value average value to obtain a binarized region image;
and determining a connected region of the binarized region image, and extracting the available land block based on gradient or edge direction histogram of each pixel point in the connected region.
3. The method of determining the shape of an area according to claim 1, wherein the step of determining the shape of the area of the available parcel by performing preliminary shape judgment of the available parcel based on a minimum bounding rectangle includes:
determining a minimum circumscribed rectangle of the available land block;
and determining the shape of the area of the available land block based on the shape parameters of the available land block and the circumscribed rectangle.
4. A method of determining the shape of an area as claimed in claim 3, wherein said step of determining the minimum bounding rectangle of said available parcel comprises:
extracting edge coordinates of the available land block, and constructing a pending rectangle surrounding the edge coordinates;
determining an area comparison result between a first area of the available land and a second area of the rectangle to be determined;
determining the inclusion relation between the point location coordinates of the available land and the area of the undetermined rectangle;
and determining the minimum circumscribed rectangle of the available land block based on the area comparison result and the inclusion relation.
5. The method of determining the shape of an area according to claim 4, wherein the step of determining the minimum bounding rectangle of the available land parcel based on the area comparison result and the inclusion relationship comprises:
if the first area is larger than the second area, moving the center of the undetermined rectangle to the center of the available land block;
and if the point location coordinates of the available land block are all on the edge or inside of the undetermined rectangle, determining the undetermined rectangle as the minimum circumscribed rectangle of the available land block.
6. The method of determining the shape of an area according to claim 5, wherein the step of determining the minimum bounding rectangle of the available land parcel based on the area comparison result and the inclusion relationship comprises:
reconstructing the pending rectangle if the first area is less than or equal to the second area until the first area is greater than the second area;
if the point location coordinates of the available land block are not located on the edge or the inside of the rectangle to be determined, rotating the rectangle to be determined, and moving a preset angle and a preset distance to the center of the available land block until the point location coordinates of the available land block are located on the edge or the inside of the rectangle to be determined.
7. A method of determining a shape of an area as claimed in claim 3, wherein the step of determining the shape of the area of the available parcel based on shape parameters of the available parcel and the bounding rectangle comprises:
and determining that the shape of the area of the available land is a regular pattern or an irregular pattern based on the ratio of the areas in the shape parameters of the available land and the circumscribed rectangle and the length and the width of the circumscribed rectangle.
8. The method of determining a region shape according to claim 1, wherein the step of determining the region shape of the irregular pattern by performing a stepwise shape judgment based on a segmentation process on the irregular pattern in the region shape includes:
dividing the irregular graph in the area shape to obtain a plurality of local areas;
determining a local reference point of the local area;
determining a region shape of the irregular pattern based on the local reference points of each of the local regions.
9. The method of determining the shape of a region according to claim 8, wherein the step of determining the local reference point of the local region comprises:
determining boundary points of the local area, determining peripheral areas of the boundary points, and determining edge points in the peripheral areas;
a local reference point of the local area is determined based on local maximum coordinates of the edge point.
10. The method according to claim 1, wherein the step of determining the shape of the region of the irregular pattern after the step of determining the shape of the region of the irregular pattern by performing a step-in shape judgment based on a segmentation process, comprises:
a wavelet transform descriptor of the region shape is determined, and the region shape is retrieved based on the wavelet transform descriptor.
11. A region shape determining apparatus, characterized in that the region shape determining apparatus includes: memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method of determining a shape of a region as claimed in any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of determining a shape of an area according to any of claims 1 to 10.
CN202310652439.1A 2023-06-01 2023-06-01 Method, device and medium for determining shape of region Pending CN116664527A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652439.1A CN116664527A (en) 2023-06-01 2023-06-01 Method, device and medium for determining shape of region

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652439.1A CN116664527A (en) 2023-06-01 2023-06-01 Method, device and medium for determining shape of region

Publications (1)

Publication Number Publication Date
CN116664527A true CN116664527A (en) 2023-08-29

Family

ID=87713274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310652439.1A Pending CN116664527A (en) 2023-06-01 2023-06-01 Method, device and medium for determining shape of region

Country Status (1)

Country Link
CN (1) CN116664527A (en)

Similar Documents

Publication Publication Date Title
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN106981077B (en) Infrared image and visible light image registration method based on DCE and LSS
CN110334762B (en) Feature matching method based on quad tree combined with ORB and SIFT
US8781177B2 (en) Method and computer program product for extracting feature vectors from a palm image
CN107688806A (en) A kind of free scene Method for text detection based on affine transformation
CN110503682B (en) Rectangular control identification method and device, terminal and storage medium
CN110348264A (en) A kind of QR image in 2 D code bearing calibration and system
CN111860309A (en) Face recognition method and system
CN110852327A (en) Image processing method, image processing device, electronic equipment and storage medium
CN111753119A (en) Image searching method and device, electronic equipment and storage medium
CN111523429A (en) Deep learning-based steel pile identification method
CN111695373A (en) Zebra crossing positioning method, system, medium and device
CN113989604A (en) Tire DOT information identification method based on end-to-end deep learning
CN108960247B (en) Image significance detection method and device and electronic equipment
CN110516731B (en) Visual odometer feature point detection method and system based on deep learning
CN108960246B (en) Binarization processing device and method for image recognition
Mishchenko et al. Model-based chart image classification
CN113378837A (en) License plate shielding identification method and device, electronic equipment and storage medium
CN111709377B (en) Feature extraction method, target re-identification method and device and electronic equipment
CN117612179A (en) Method and device for recognizing characters in image, electronic equipment and storage medium
CN112418210B (en) Intelligent classification method for tower inspection information
CN110458004B (en) Target object identification method, device, equipment and storage medium
CN111325199B (en) Text inclination angle detection method and device
CN111488811A (en) Face recognition method and device, terminal equipment and computer readable medium
CN116664527A (en) Method, device and medium for determining shape of region

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