CN107993224B - Object detection and positioning method based on circular marker - Google Patents

Object detection and positioning method based on circular marker Download PDF

Info

Publication number
CN107993224B
CN107993224B CN201711215946.XA CN201711215946A CN107993224B CN 107993224 B CN107993224 B CN 107993224B CN 201711215946 A CN201711215946 A CN 201711215946A CN 107993224 B CN107993224 B CN 107993224B
Authority
CN
China
Prior art keywords
image
circular marker
circular
marker
target object
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.)
Expired - Fee Related
Application number
CN201711215946.XA
Other languages
Chinese (zh)
Other versions
CN107993224A (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.)
Shenyang Jianzhu University
Original Assignee
Shenyang Jianzhu University
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 Shenyang Jianzhu University filed Critical Shenyang Jianzhu University
Priority to CN201711215946.XA priority Critical patent/CN107993224B/en
Publication of CN107993224A publication Critical patent/CN107993224A/en
Application granted granted Critical
Publication of CN107993224B publication Critical patent/CN107993224B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

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

Abstract

The invention discloses an object detection and positioning method based on a circular marker, which comprises the following steps: step 1: attaching the circular marker to the center of a target object, and collecting an RGB image of the target object; step 2: converting the RGB image into an HSV image; and step 3: h, S, solving a normalized histogram of the two channels, and determining the threshold range of the circular marker; and 4, step 4: binarizing the image according to the threshold range of the circular marker obtained by the H, S channel; and 5: performing morphological processing on the image of the circular marker; step 6: carrying out connected region contour marking on the images after morphological processing; and 7: and calculating the perimeter and the area of the contour, judging whether the circularity is close to 1, if so, determining the region as the target object, and calculating the circular mass center through circular fitting, otherwise, determining that the region is not the target object. The object detection positioning method can be simplified and the object detection efficiency can be improved by arranging the marker in the center of the object.

Description

Object detection and positioning method based on circular marker
Technical Field
The invention relates to the technical field of computer vision, in particular to an object detection and positioning method based on a circular marker.
Background
In robot object grabbing, only the target object and the position thereof need to be determined, and the specific shape of the target object does not need to be recognized. Object detection and positioning have become one of the research hot problems in the field of robots at present. Fast detection and accurate positioning become two major development trends of object detection and positioning.
In the image registration process, due to the influences of factors such as object translation, scaling, rotation, illumination change, occlusion, image noise and the like, an ideal effect cannot be achieved in practical application. Therefore, in object recognition, it is generally desirable to find an important basis for identifying an object, preferably a local feature descriptor of an image that maintains certain invariance and stability to factors such as illumination change, translation, rotation, scaling, occlusion, noise, and the like. The selection of object feature points depends largely on the image content, and it is relatively easy to extract feature points as much as possible.
However, different object detection methods are different, and a general object detection method has not been formed so far. For some special objects, this will reduce the efficiency of object detection and positioning to some extent, and even result of detection failure, so that the object position cannot be determined.
Disclosure of Invention
The embodiment of the invention provides an object detection and positioning method based on a circular marker, which can simplify the object detection and positioning method and improve the object detection efficiency.
The invention provides an object detection and positioning method based on a circular marker, which comprises the following steps:
step 1: attaching the circular marker to the center of a target object, and collecting an RGB image of the target object;
step 2: processing the image, and converting the RGB image into an HSV image;
and step 3: respectively solving H, S normalized histograms of the two channels, and determining the threshold range of the circular marker;
and 4, step 4: binarizing the image according to the threshold range of the circular marker obtained by the H, S channel to segment the image of the circular marker;
and 5: performing morphological processing on the image of the circular marker to fill the hole inside the image and eliminate the protrusion;
step 6: carrying out connected region contour marking on the images after morphological processing;
and 7: and calculating the perimeter and the area of the contour, judging whether the circularity is close to 1, if so, determining that the region is a target object, and calculating the circular mass center through circular fitting, otherwise, adjusting the camera to detect the target object again, wherein the region is not the target object.
In the object detection and positioning method based on the circular marker, the circular marker is a pure-color marker, and the color of the circular marker is different from the color of the target object and the color of the background.
In the object detecting and positioning method based on the circular marker of the present invention, in the step 5, the image of the circular marker is morphologically processed, and a closed operation is specifically adopted to smooth the image contour, close the narrow discontinuity, and fill the fine holes.
In the object detecting and positioning method based on the circular marker of the present invention, the step 6 specifically is:
the entire image is marked by locating the inner and outer contours of the connected region using a region tracking algorithm.
In the object detecting and positioning method based on the circular marker of the present invention, the perimeter of the contour in step 7 is calculated by the boundary coordinates.
In the object detecting and positioning method based on the circular marker of the present invention, the area in step 7 is obtained by counting the number of pixels inside the boundary.
In the object detecting and positioning method based on the circular marker of the present invention, the circularity in step 7 is calculated according to the following formula:
Figure BDA0001485542370000021
where d represents the circularity, a represents the area of the outline, and C represents the perimeter of the outline.
According to the object detection and positioning method based on the circular marker, the circular marker with the color different from that of the target object is arranged at the center of the target object, and the target object is accurately grabbed by the robot through the identification and positioning of the marker.
Drawings
Fig. 1 is a flow chart of an object detection and positioning method based on a circular marker.
Detailed Description
Because many objects in the real world are irregular, the detection and positioning of the objects by using a general algorithm are difficult to realize, and the target position can be determined by detecting the positions of the markers by attaching specific markers on the target object. The method and the device for determining the position of the object by detecting the marker on the target object can greatly simplify the detection algorithm and improve the detection efficiency. And then separating the target object from the complex background through visual information, namely detecting the target object through methods of color segmentation, morphological processing, connected domain marking, circularity judgment and the like in sequence.
Fig. 1 shows a flowchart of an object detecting and positioning method based on a circular marker according to the present invention, which includes the following steps:
step 1: attaching the circular marker to the center of a target object, and collecting an RGB image of the target object;
in specific implementation, the circular marker is a solid-color marker, and the color of the circular marker is different from the color of the target object and the color of the background.
Step 2: processing the image, and converting the RGB image into an HSV image;
and step 3: respectively solving H, S normalized histograms of the two channels, and determining the threshold range of the circular marker;
in specific implementation, under normal illumination, the influence degree of illumination on an image is considered in color segmentation, and if the influence degree is not large, the V channel can be ignored, and the segmentation is carried out only by using the threshold values of the H channel and the S channel. If the result is also more affected by the V channel, then H, S, V can be extracted for all three channels.
And 4, step 4: binarizing the image according to the threshold range of the circular marker obtained by the H, S channel to segment the image of the circular marker;
since the color of the marker is different from the color of the target object and the color of the background, after the color is divided, the area where the marker is located is white, and any other color area is black.
And 5: performing morphological processing on the image of the circular marker to fill the hole inside the image and eliminate the protrusion;
in specific implementation, the image of the circular marker is subjected to morphological processing, and closed operation is adopted, so that the image contour becomes smooth, narrow gaps are closed, and fine holes are filled.
Step 6: carrying out connected region contour marking on the images after morphological processing;
in specific implementation, a region tracking algorithm is adopted, and the whole image is marked by positioning the inner contour and the outer contour of the connected region. The region tracking algorithm consumes time when the connected contours are more, but the invention carries out binarization processing on the image in step 4, so that the number of the contours is greatly reduced, and the invention can adopt the algorithm to carry out contour searching.
And 7: calculating the perimeter and the area of the outline, judging whether the circularity is close to 1, if the circularity is close to 1, taking the area as a target object, and calculating the circle center coordinate of the circular marker through circular fitting; otherwise, the area is not the target object, and the camera is adjusted to detect the target object again.
In particular, the perimeter of the contour is calculated by the boundary coordinates. The area of the outline is obtained by counting the number of pixels inside the boundary. Circularity is calculated according to the following equation:
Figure BDA0001485542370000041
where d represents the circularity, a represents the area of the outline, and C represents the perimeter of the outline.
The detected region is considered to be circular only when d is 1 at the time of circularity determination. However, since errors are inevitably generated in morphological processing and connected component labeling, a circle can be detected by default in a range where the circularity d is close to 1.
The object location in the present invention refers to location in an image, and its coordinates are two-dimensional. If the actual coordinates in the three-dimensional world and the actual distance from the camera to the target object are required to be continuously calculated, monocular distance measurement can be completed, for example, the camera is calibrated to calculate internal parameters, and then a geometric constraint model is established to perform monocular distance measurement to calculate the three-dimensional coordinates. In step one, a criterion for the position of the marker application is established, i.e. a circular marker is applied as far as possible in the center of the object, so that the actual value of Z is only influenced by the position of the marker application. The grabbing of the object is not influenced.
In the present invention, in order to achieve better detection effect, the color of the circular marker should be different from the color of the target object and the color of the background. The color size of the circular marker is left to the discretion of the user. The invention is suitable for target detection and positioning in different fields, such as agricultural picking robots, industrial object grabbing and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the scope of the present invention, which is defined by the appended claims.

Claims (5)

1. An object detection and positioning method based on a circular marker is characterized by comprising the following steps:
step 1: attaching the circular marker to the center of a target object, and collecting an RGB image of the target object;
step 2: processing the image, and converting the RGB image into an HSV image;
and step 3: respectively solving H, S normalized histograms of the two channels, and determining the threshold range of the circular marker;
and 4, step 4: binarizing the image according to the threshold range of the circular marker obtained by the H, S channel to segment the image of the circular marker;
and 5: performing morphological processing on the image of the circular marker to fill the hole inside the image and eliminate the protrusion;
step 6: carrying out connected region contour marking on the images after morphological processing;
and 7: calculating the perimeter and the area of the outline, judging whether the circularity is close to 1, if so, determining that the area is a target object, and calculating the circular mass center through circular fitting, otherwise, adjusting the camera to detect the target object again, wherein the area is not the target object; the perimeter of the contour is calculated through boundary coordinates; the area is obtained by counting the number of pixels inside the boundary.
2. The object detecting and positioning method based on the circular marker as claimed in claim 1, wherein the circular marker is a solid color marker, and the color of the circular marker is different from the color of the target object and the color of the background.
3. The method as claimed in claim 1, wherein the step 5 is performed by performing morphological processing on the image of the circular marker, specifically by performing a close operation to smooth the contour of the image, to close up narrow gaps, and to fill in fine holes.
4. The object detecting and positioning method based on the circular marker as claimed in claim 1, wherein the step 6 is specifically as follows:
the entire image is marked by locating the inner and outer contours of the connected region using a region tracking algorithm.
5. The object detecting and positioning method based on the circular marker as claimed in claim 1, wherein the circularity in step 7 is calculated according to the following formula:
Figure FDA0002973040170000021
where d represents the circularity, a represents the area of the outline, and C represents the perimeter of the outline.
CN201711215946.XA 2017-11-28 2017-11-28 Object detection and positioning method based on circular marker Expired - Fee Related CN107993224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711215946.XA CN107993224B (en) 2017-11-28 2017-11-28 Object detection and positioning method based on circular marker

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711215946.XA CN107993224B (en) 2017-11-28 2017-11-28 Object detection and positioning method based on circular marker

Publications (2)

Publication Number Publication Date
CN107993224A CN107993224A (en) 2018-05-04
CN107993224B true CN107993224B (en) 2021-06-11

Family

ID=62033762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711215946.XA Expired - Fee Related CN107993224B (en) 2017-11-28 2017-11-28 Object detection and positioning method based on circular marker

Country Status (1)

Country Link
CN (1) CN107993224B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271937B (en) * 2018-09-19 2020-09-25 深圳市赢世体育科技有限公司 Sports ground marker identification method and system based on image processing
CN109886917B (en) * 2019-01-09 2021-04-09 浙江舜宇光学有限公司 Crystal disc positioning method and device
CN110660047A (en) * 2019-09-10 2020-01-07 上海鼎充新能源技术有限公司 Automatic identification and positioning method for electric vehicle charging interface
CN110624853A (en) * 2019-09-25 2019-12-31 武汉易视维科技有限公司 Online magic stick visual detection system
CN111325802B (en) * 2020-02-11 2023-04-25 中国空气动力研究与发展中心低速空气动力研究所 Circular mark point identification and matching method in helicopter wind tunnel test
CN111552292B (en) * 2020-05-09 2023-11-10 沈阳建筑大学 Vision-based mobile robot path generation and dynamic target tracking method
CN114549442B (en) * 2022-02-14 2022-09-20 常州市新创智能科技有限公司 Real-time monitoring method, device and equipment for moving object and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930547A (en) * 2012-11-13 2013-02-13 中国农业大学 Cotton foreign fiber image online segmentation method and system on the condition of wind power delivery
CN103093468A (en) * 2013-01-22 2013-05-08 清华大学 Dense object segmentation method based on image morphology
CN103955705A (en) * 2014-04-29 2014-07-30 银江股份有限公司 Traffic signal lamp positioning, recognizing and classifying method based on video analysis
CN104424482A (en) * 2013-08-28 2015-03-18 富士通株式会社 Image processing apparatus and image processing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7657100B2 (en) * 2005-05-09 2010-02-02 Like.Com System and method for enabling image recognition and searching of images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930547A (en) * 2012-11-13 2013-02-13 中国农业大学 Cotton foreign fiber image online segmentation method and system on the condition of wind power delivery
CN103093468A (en) * 2013-01-22 2013-05-08 清华大学 Dense object segmentation method based on image morphology
CN104424482A (en) * 2013-08-28 2015-03-18 富士通株式会社 Image processing apparatus and image processing method
CN103955705A (en) * 2014-04-29 2014-07-30 银江股份有限公司 Traffic signal lamp positioning, recognizing and classifying method based on video analysis

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
An estimation of central points of circle markers in a vision system by using Kalman filter and complementary filter;Piotr Owczarek et al;《2015 20th International Conference on Methods and Models in Automation and Robotics (MMAR)》;20151001;940-945页 *
Perception scheme for fruits detection in trees for autonomous agricultural robot applications;Bourhane Kadmiry et al;《2015 International Conference on Image and Vision Computing New Zealand (IVCNZ)》;20161201;1-6页 *
交通警告标志定位方法研究;冷璐等;《微电子学与计算机》;20080831;第25卷(第8期);103-105页 *
基于粒子群算法的摄像机内参数优化方法研究;郭彤颖等;《激光与光电子学进展》;20170706;1-9页 *

Also Published As

Publication number Publication date
CN107993224A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
CN107993224B (en) Object detection and positioning method based on circular marker
CN108319973B (en) Detection method for citrus fruits on tree
US9639748B2 (en) Method for detecting persons using 1D depths and 2D texture
Chuang et al. Automatic fish segmentation via double local thresholding for trawl-based underwater camera systems
US10043279B1 (en) Robust detection and classification of body parts in a depth map
CN106709500B (en) Image feature matching method
CN112734761B (en) Industrial product image boundary contour extraction method
CN106682641A (en) Pedestrian identification method based on image with FHOG- LBPH feature
CN109815822B (en) Patrol diagram part target identification method based on generalized Hough transformation
KR20080032856A (en) Recognition method of welding line position in shipbuilding subassembly stage
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
CN110751619A (en) Insulator defect detection method
CN104123554A (en) SIFT image characteristic extraction method based on MMTD
CN103106409A (en) Composite character extraction method aiming at head shoulder detection
CN109389165A (en) Oil level gauge for transformer recognition methods based on crusing robot
CN112101108B (en) Left-right pass-through sign recognition method based on graph pole position characteristics
CN107103301B (en) Method and system for matching discriminant color regions with maximum video target space-time stability
Dewi et al. Object detection without color feature: Case study Autonomous Robot
CN114581658A (en) Target detection method and device based on computer vision
Hu et al. Fast face detection based on skin color segmentation using single chrominance Cr
CN111435429A (en) Gesture recognition method and system based on binocular stereo data dynamic cognition
KR101528757B1 (en) Texture-less object recognition using contour fragment-based features with bisected local regions
CN114926635B (en) Target segmentation method in multi-focus image combined with deep learning method
CN112541471B (en) Multi-feature fusion-based shielding target identification method
CN114549420A (en) Workpiece identification and positioning method based on template matching

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210611