[go: up one dir, main page]

CN115439529B - Positioning method and system based on color deformation material image positioning algorithm - Google Patents

Positioning method and system based on color deformation material image positioning algorithm Download PDF

Info

Publication number
CN115439529B
CN115439529B CN202211072170.1A CN202211072170A CN115439529B CN 115439529 B CN115439529 B CN 115439529B CN 202211072170 A CN202211072170 A CN 202211072170A CN 115439529 B CN115439529 B CN 115439529B
Authority
CN
China
Prior art keywords
image
channel
color
gray value
max
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
CN202211072170.1A
Other languages
Chinese (zh)
Other versions
CN115439529A (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.)
Jing Ke Shenzhen Robot Technology Co ltd
Original Assignee
Jing Ke Shenzhen Robot 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 Jing Ke Shenzhen Robot Technology Co ltd filed Critical Jing Ke Shenzhen Robot Technology Co ltd
Priority to CN202211072170.1A priority Critical patent/CN115439529B/en
Publication of CN115439529A publication Critical patent/CN115439529A/en
Application granted granted Critical
Publication of CN115439529B publication Critical patent/CN115439529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • 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
    • 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/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
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

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 Processing (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to a positioning method and a positioning system based on a color deformation material image positioning algorithm, wherein the positioning method and the positioning system comprise a computer, an industrial robot, a camera, a grabbing device, a transparent material tray and a surface light source, wherein the camera is used for acquiring a color deformation material image; the computer obtains a color deformation material image HSV model based on the color deformation material image, judges the material color based on the color deformation material image HSV model, judges a material area based on a gray level threshold of the color deformation material image HSV model, obtains a center point and an inclination angle of the material based on the material area, and sends positioning information reflecting the center point and the inclination angle of the material to the industrial robot and the grabbing device. The application has the effect of improving the precision of the automatic assembly technology of the electronic product.

Description

Positioning method and system based on color deformation material image positioning algorithm
Technical Field
The application relates to the field of image positioning, in particular to a positioning method and a positioning system based on a color deformation material image positioning algorithm.
Background
Because the automatic assembly of electronic products has higher requirements on precision, the production requirements are hardly met by using simple mechanical positioning and mechanical assembly at present, and therefore, the positioning and deviation correcting technology of machine vision is increasingly applied to the high-precision electronic element assembly process. Machine vision is an image processing technology applied to robots and comprising appearance detection, visual positioning, size measurement and pattern recognition, and is an important technical means for realizing tasks such as robot grabbing, product quality detection, sorting and the like. Machine vision is essentially an application of image processing technology in industrial automation, and by using optical elements, industrial digital cameras and image processing tools, feature information such as object position, size, color, texture and motion state is obtained, so that object quality and category can be rapidly judged or object positioning can be performed.
The deformable material in the assembly of the electronic product is easy to deviate in the position of the material in the process of grabbing and lowering due to the characteristic of easy deformation, so that the assembly failure is caused due to the fact that the assembly accuracy is too low. Therefore, an image positioning technology is required to be provided for the assembly process of the deformable material, and the high-precision requirement of automatic assembly of the deformable material is met.
In view of the above-mentioned related art, the inventors consider that the existing electronic product automatic assembly technology has a low precision.
Disclosure of Invention
In order to improve the precision of an automatic assembly technology of electronic products, the application provides a positioning method and a positioning system based on a color deformation material image positioning algorithm.
The application provides a positioning method and a positioning system based on a color deformation material image positioning algorithm, which adopt the following technical scheme:
In a first aspect, the present application provides a positioning method based on a color deformation material image positioning algorithm, which adopts the following technical scheme:
a positioning method based on a color deformation material image positioning algorithm comprises the following steps of
Acquiring a color deformation material image;
acquiring a color deformation material image HSV model;
judging the color of the material based on a color deformation material image HSV model;
Judging a material area based on a gray threshold of the color deformation material image HSV model;
and acquiring the center point and the inclination angle of the material based on the material area.
Through adopting above-mentioned technical scheme, at the in-process of electronic product automatic assembly, can be through acquireing the color deformation material image to change color deformation material image into HSV model, discern the colour, the region, central point and the inclination of the material of acquireing the image, improved the precision of electronic product automatic assembly technique.
Preferably, the acquiring the color deformation material image HSV model includes:
converting the obtained color deformation material image into three RGB single-channel images;
The image is converted from the RGB color space to the HSV color space as follows:
R`=R/255
G`=G/255
B`=B/255
Cmax=max(R`,G`,B`)
Cmin=min(R`,G`,B`)
Δ=Cmax-Cmin
V=Cmax
Wherein, the gray value R epsilon [0, 255] of the red channel and the gray value G epsilon of the green channel
[0, 255], The gray value B epsilon [0, 255] of the blue channel;
Hue H epsilon [0,2 pi ], saturation S epsilon [0,1], brightness V epsilon [0,1].
By adopting the technical scheme, the RGB color space is converted into the HSV color space, and the color, the area, the central point and the inclination angle of the color deformation material can be accurately acquired based on the parameters in the HSV color space.
Preferably, the determining the color of the material based on the color deformation material image HSV model includes:
Acquiring a histogram H of a gray value range of a material image under the H channel within [ H min,Hmax ];
Acquiring a histogram H P of a gray value range of a material image under an S channel within [ S minP,SmaxP ];
acquiring a histogram H NG of a gray value range of a material image under an S channel within [ S minNG,SmaxNG ];
Judging the color of the material based on the gray value histogram of the H channel image and the gray value histogram of the S channel image;
Wherein, [ H minb,Hmaxb ] is a blue gray value interval under the H channel, [ S minP,SmaxP ] is a pink gray value interval under the S channel, and [ S minNG,SmaxNG ] is a white gray value interval under the S channel.
By adopting the technical scheme, the histogram H of the lower range of the H channel in the blue image gray value [ H min,Hmax ] reflects the number of pixels of the image in the interval under the H channel, the histogram H P of the lower range of the S channel in the pink image gray value [ S minP,SmaxP ] reflects the number of pixels of the image in the interval under the S channel, and the histogram H NG of the lower range of the S channel in the white image gray value [ S minNG,SmaxNG ] reflects the number of pixels of the image in the interval under the S channel; and judging the color of the material based on the number of pixels.
Preferably, the determining the color of the material based on the gray value histogram of the H-channel image and the gray value histogram of the S-channel image includes:
when judging that H is larger than a blue material threshold H B, considering the material as blue;
When the material is not blue, judging whether H P is larger than H NG, if so, considering the material as pink; otherwise, no material is considered.
By adopting the technical scheme, whether materials exist can be simply and accurately judged; if so, the material can be judged to be pink or blue.
Preferably, the judging the material area based on the gray threshold of the color deformation material image HSV model includes:
preprocessing the image by mean filtering, and reducing noise interference of background details;
The image region R is subjected to threshold segmentation by using a gray threshold under the S channel to obtain a region containing materials, and a background region is filtered, wherein the formula is as follows: s min<RS<Smax;
The noise influence of the trough is filtered by using a gray threshold H min、Hmax under the H channel, and an area R SH after S channel and H channel filtering is obtained, wherein the formula is as follows: h min<RSH<Hmax;
The noise influence of the black edge part of the material is filtered out by using a gray threshold V min、Vmax under the V channel, and a material region R SHV is obtained, wherein the formula is as follows: v min<RSHV<Vmax;
When the material is blue, a threshold value of the blue material is called, S min、Smax is a gray value range of the blue material under an S channel, H min、Hmax is a gray value range of the blue material under an H channel, and V min、Vmax is a gray value range of the blue material under a V channel. When the material is pink, a threshold value of the pink material is called, S min、Smax is a gray value range of the pink material under the S channel, H min、Hmax is a gray value range of the pink material under the H channel, and V min、Vmax is a gray value range of the pink material under the V channel.
And after the material areas are filtered, the area with the largest area is selected, the noise influence of peripheral materials is filtered, and the material areas with accurate target materials can be obtained.
Through adopting above-mentioned technical scheme, can be according to the HSV passageway lower gray scale range of blue and pink material that sets up in advance, screen out the accurate region of material, noise interference such as reduction silo profile.
Preferably, the acquiring the center point and the inclination angle of the material based on the material area includes:
Obtaining a minimum circumscribed rectangle of the area based on the material area, and obtaining a row and column value [ V r_sr,Vc_sr ] and an inclination angle theta of a central point of the minimum circumscribed rectangle;
constructing a straight line in the horizontal direction and the vertical direction based on the central point row-column value [ V r_sr,Vc_sr ] and the inclination angle theta of the minimum circumscribed rectangle; the straight line formula in the horizontal direction is as follows:
y=kh*x+bh
Where the slope k h =tan θ of a horizontal straight line, the intercept b h=(H-Vr_sr)-kh*Vc_sr of the straight line on the y-axis, H is the pixel width of the image.
The straight line formula in the vertical direction is as follows:
y=kv*x+bv,abs(θ)>0.01°
x=Vc_sr,abs(θ)≤0.01°
Wherein the slope of the straight line in the vertical direction The intercept b v=(H-Vr_sr)-kv*Vc_sr of the line on the y-axis, H, is the pixel width of the image.
Through gray value traversal, traversing outwards along straight lines in the horizontal and vertical directions from the minimum circumscribed rectangular central point, and acquiring row and column values of four intersection points of straight lines in the horizontal and vertical directions and material edges based on positions of gray value abrupt change: the upper point [ V r_t,Vc_t ], the lower point [ V r_b,Vc_b ], the left point [ V r_l,Vc_l ], the right point [ V r_r,Vc_r ], and then the accurate row and column value [ R m,Cm ] of the center point of the material are obtained, and the formula is as follows:
Rm=(Vr_t+Vr_b)/2
Cm=(Vc_l+Vc_r)/2
By adopting the technical scheme, after the target area of the material is obtained, the accurate area center point and the area inclination angle can be found out.
In a second aspect, the application provides a system based on a color deformation material image positioning algorithm, which adopts the following technical scheme:
a system based on a color morphing material image localization algorithm, comprising: the device comprises a computer, an industrial robot, a camera, a grabbing device, a transparent material tray and a surface light source;
the surface light source is arranged on a panel of the operation table, and the transparent tray is arranged above the surface light source and is used for providing a transparent background for the color deformation materials; the industrial robot comprises a machine body and a mechanical arm, wherein the bottom of the machine body is fixedly connected to an operation table, and the mechanical arm is perpendicular to the operation table and is fixedly connected to the machine body; the camera is mounted on the mechanical arm, and the lens of the camera is horizontally aligned with the operation table; the grabbing device is arranged at the tail end of the manipulator close to one side of the operation table; the computer is respectively and electrically connected with the industrial robot, the camera and the grabbing device, and the camera is used for acquiring the color deformation material image and sending the image to the computer; the computer sequentially acquires a color deformation material image HSV model, judges the color of a material based on the color deformation material image HSV model, judges a material area based on the gray threshold of the color deformation material image HSV model and acquires the center point and the inclination angle of the material based on the material area to obtain positioning information, and sends the positioning information to the industrial robot and the grabbing device.
By adopting the technical scheme, the transparent material tray is arranged above the surface light source and is used for providing a transparent background for the color deformation material; the computer, the industrial robot, the camera and the grabbing device can complete automatic assembly of the electronic product in a matching way through the positioning method based on the color deformation material image positioning algorithm in the first aspect, and the accuracy of the automatic assembly technology of the electronic product is improved.
Preferably, the industrial robot is a six-axis industrial robot.
By adopting the technical scheme, the six-axis industrial robot has high degree of freedom and is suitable for working in many tracks and angles.
Preferably, the camera is a USB industrial camera.
By adopting the technical scheme, the USB interface is the most universal interface applied worldwide, and the USB industrial camera can be immediately connected to the USB interface to work stably, so that the usability is improved.
Preferably, the gripping device adopts a sucker.
By adopting the technical scheme, the deformation of the materials in the grabbing process is avoided.
In summary, the present application includes at least one of the following beneficial technical effects:
1. In the process of automatically assembling the electronic product, the color, the area, the center point and the inclination angle of the material of the obtained image can be identified by obtaining the color deformation material image and converting the color deformation material image into an HSV model, so that the accuracy of the automatic assembling technology of the electronic product is improved;
2. The RGB color space is converted into an HSV color space, and the color, the area, the center point and the inclination angle of the color deformation material can be accurately obtained based on parameters in the HSV color space;
3. The transparent material tray is arranged above the surface light source and is used for providing a transparent background for the color deformation material; the computer, the industrial robot, the camera and the grabbing device can complete automatic assembly of the electronic product in a matching way through the positioning method based on the color deformation material image positioning algorithm in the first aspect, and the accuracy of the automatic assembly technology of the electronic product is improved.
Drawings
FIG. 1 is a workflow diagram of a positioning method based on a color deformation material image positioning algorithm.
FIG. 2 is a logic flow diagram of a positioning method based on a color deformation material image positioning algorithm.
FIG. 3 is a system workflow diagram based on a color morphing material image localization algorithm.
Detailed Description
The application is described in further detail below with reference to fig. 1-3.
The embodiment of the application discloses a positioning method based on a color deformation material image positioning algorithm. Referring to fig. 1 and 2, the method based on the color deformation material image positioning algorithm comprises the following steps:
S1: acquiring a color deformation material image;
S2: acquiring a color deformation material image HSV model;
s3: judging the color of the material based on a color deformation material image HSV model;
s4: judging a material area based on a gray threshold of the color deformation material image HSV model;
s5: and acquiring the center point and the inclination angle of the material based on the material area.
In the process of automatic assembly of the electronic product, the color, the area, the center point and the inclination angle of the material of the acquired image can be identified by acquiring the color deformation material image and converting the color deformation material image into an HSV model, so that the accuracy of the automatic assembly technology of the electronic product is improved.
The method for acquiring the color deformation material image HSV model comprises the following steps:
converting the acquired color deformation material image into three RGB single-channel images by adopting a pointer shifting method;
The image is converted from the RGB color space to the HSV color space as follows:
R`=R/255
G`=G/255
B`=B/255
Cmax=max(R`,G`,B`)
Cmin=min(R`,G`,B`)
Δ=Cmax-Cmin
V=Cmax
Wherein, the gray value R epsilon [0, 255] of the red channel and the gray value G epsilon of the green channel
[0, 255], The gray value B epsilon [0, 255] of the blue channel;
Hue H epsilon [0,2 pi ], saturation S epsilon [0,1], brightness V epsilon [0,1].
Judging the material color based on the color deformation material image HSV model comprises the following steps:
Acquiring a histogram H of a gray value range of a material image under the H channel within [ H min,Hmax ];
Acquiring a histogram H P of a gray value range of a material image under an S channel within [ S minP,SmaxP ];
acquiring a histogram H NG of a gray value range of a material image under an S channel within [ S minNG,SmaxNG ];
and judging the color of the material based on the gray value histogram of the H channel image and the gray value histogram of the S channel image.
Wherein, [ H minb,Hmaxb ] is a blue gray value interval under the H channel, [ S minP,SmaxP ] is a pink gray value interval under the S channel, and [ S minNG,SmaxNG ] is a white gray value interval under the S channel.
Specifically, [ H min,Hmax ] is [125, 160], [ S minP,SmaxP ] is [80, 100], and [ S minNG,SmaxNG ] is [0, 20].
Judging the color of the material based on the gray value histogram of the H-channel image and the gray value histogram of the S-channel image comprises:
when judging that H is larger than a blue material threshold H B, considering the material as blue;
When the material is not blue, judging whether H P is larger than H NG, if so, considering the material as pink; otherwise, no material is considered.
Specifically, the blue material threshold H B is set to 500000, and the number of pixels of pink and white in the interval of [125, 160] is 20000, so when the material is blue, the number of pixels H reflected by the histogram of the gray value in the interval of [125, 160] under the H channel is 600000, and the value is greater than the blue material threshold 500000, so that the material can be judged to be blue;
When the material is not blue, determining that the material is not a material or is a pink material by judging whether H P is larger than H NG; if the material is pink, the number Hp of pixels reflected by the histogram with the gray value of [80, 100] is 500000, and the number Hng of pixels reflected by the histogram with the gray value of 0-20 is 100000 under the S channel; if no material exists, the number Hp of pixels reflected by the histogram with the gray value of 80-100 is 1000, and the number Hng of pixels reflected by the histogram with the gray value of 0-20 is 600000 under the S channel; therefore, when H P is larger than H NG, the material is considered to be pink; otherwise, no material is considered.
Judging the material area based on the gray threshold of the color deformation material image HSV model comprises the following steps:
preprocessing the image by mean filtering, and reducing noise interference of background details;
The image region R is subjected to threshold segmentation by using a gray threshold under the S channel to obtain a region containing materials, and a background region is filtered, wherein the formula is as follows: s min<RS<Smax;
The noise influence of the trough is filtered by using a gray threshold H min、Hmax under the H channel, and an area R SH after S channel and H channel filtering is obtained, wherein the formula is as follows: h min<RSH<Hmax;
The noise influence of the black edge part of the material is filtered out by using a gray threshold V min、Vmax under the V channel, and a material region R SHV is obtained, wherein the formula is as follows: v min<RSHV<Vmax;
When the material is blue, a threshold value of the blue material is called, S min、Smax is a gray value range of the blue material under an S channel, H min、Hmax is a gray value range of the blue material under an H channel, and V min、Vmax is a gray value range of the blue material under a V channel. When the material is pink, a threshold value of the pink material is called, S min、Smax is a gray value range of the pink material under the S channel, H min、Hmax is a gray value range of the pink material under the H channel, and V min、Vmax is a gray value range of the pink material under the V channel.
And after the material areas are filtered, the area with the largest area is selected, the noise influence of peripheral materials is filtered, and the material areas with accurate target materials can be obtained.
Acquiring the center point and the inclination angle of the material based on the material area comprises:
Obtaining a minimum circumscribed rectangle of the area based on the material area, and obtaining a row and column value [ V r_sr,Vc_sr ] and an inclination angle theta of a central point of the minimum circumscribed rectangle;
constructing a straight line in the horizontal direction and the vertical direction based on the central point row-column value [ V r_sr,Vc_sr ] and the inclination angle theta of the minimum circumscribed rectangle; the straight line formula in the horizontal direction is as follows:
y=kh*x+bh
Wherein the slope k h =tan θ of the horizontal straight line, the intercept b h=(H-Vr_sr)-kh*Vc_sr of the straight line on the y-axis, H is the pixel width of the image;
The straight line formula in the vertical direction is as follows:
y=kv*x+bv,abs(θ)>0.01°,
x=Vc_sr,abs(θ)≤0.01°;
Wherein the slope of the straight line in the vertical direction The intercept b v=(H-Vr_sr)-kv*Vc_sr of the line on the y-axis, H, is the pixel width of the image.
Through gray value traversal, traversing outwards along straight lines in the horizontal and vertical directions from the minimum circumscribed rectangular central point, and acquiring row and column values of four intersection points of straight lines in the horizontal and vertical directions and material edges based on positions of gray value abrupt change: the upper point [ V r_t,Vc_t ], the lower point [ V r_b,Vc_b ], the left point [ V r_l,Vc_l ], the right point [ V r_r,Vc_r ], and then the accurate row and column value [ R m,Cm ] of the center point of the material are obtained, and the formula is as follows:
Rm=(Vr_t+Vr_b)/2
Cm=(Vc_l+Vc_r)/2。
The implementation principle of the positioning method based on the color deformation material image positioning algorithm provided by the embodiment of the application is as follows: the color of the material can be judged according to the gray values of H, S and V channels of the deformable material with different colors in the HSV space under the transparent background. And the material center point and the inclination angle are determined through the material area, so that the rapid image positioning of the materials with different colors is realized.
The embodiment of the application also discloses a system based on the color deformation material image positioning algorithm. Referring to fig. 2, a system based on a color deformation material image positioning algorithm includes a computer, an industrial robot, a camera, a gripping device, a transparent tray, and a facial light source.
The surface light source is arranged on a panel of the operation table, and the transparent material tray is arranged above the surface light source and is used for providing a transparent background for the color deformation materials; the industrial robot comprises a machine body and a mechanical arm, wherein the bottom of the machine body is fixedly connected to the operating platform, and the mechanical arm is perpendicular to the operating platform and is fixedly connected to the machine body; the camera is arranged on the mechanical arm, and the lens of the camera is horizontally aligned with the operation table; the grabbing device is arranged at the tail end of the manipulator close to one side of the operation table; the computer is respectively and electrically connected with the industrial robot, the camera and the grabbing device, and the camera is used for acquiring the color deformation material image and sending the image to the computer; the computer sequentially acquires a color deformation material image HSV model, judges the color of the material based on the color deformation material image HSV model, judges a material area based on the gray threshold value of the color deformation material image HSV model and acquires the center point and the inclination angle of the material based on the material area to obtain positioning information, and sends the positioning information to the industrial robot and the grabbing device.
The transparent material tray is arranged above the surface light source and is used for providing a transparent background for the color deformation material; the computer, the industrial robot, the camera and the grabbing device can complete automatic assembly of the electronic product in a matching way through the positioning method based on the color deformation material image positioning algorithm in the first aspect, and the accuracy of the automatic assembly technology of the electronic product is improved.
The industrial robot adopts a six-axis industrial robot.
The camera adopts a USB industrial camera.
The gripping device adopts a sucker.
The implementation principle of the system based on the color deformation material image positioning algorithm provided by the embodiment of the application is as follows: the mechanical arm of the six-axis industrial robot is moved to a calibration point (the USB industrial camera is aligned with the material), the USB industrial camera acquires images and transmits the images to the computer, the computer obtains the center point and the inclination angle data of the material by calling a positioning method based on a color deformation material image positioning algorithm, the center point and the inclination angle data of the material are sent to the six-axis industrial robot, and the six-axis industrial robot moves the mechanical arm according to the center point and the inclination angle data of the material, so that a sucker arranged on the mechanical arm sucks the material to assemble the material, and the precision of an automatic electronic product assembling technology is improved.
The above embodiments are not intended to limit the scope of the present application, so: all equivalent changes in structure, shape and principle of the application should be covered in the scope of protection of the application.

Claims (6)

1. A positioning method based on a color deformation material image positioning algorithm is characterized by comprising the following steps of: comprising the following steps:
Acquiring a color deformation material image;
acquiring a color deformation material image HSV model;
judging the color of the material based on a color deformation material image HSV model;
Judging a material area based on a gray threshold of the color deformation material image HSV model;
acquiring a center point and an inclination angle of a material based on a material area;
The acquiring the color deformation material image HSV model comprises the following steps:
converting the obtained color deformation material image into three RGB single-channel images;
The image is converted from the RGB color space to the HSV color space as follows:
R`=R/255
G`=G/255
B`=B/255
Cmax=max(R`,G`,B`)
Cmin=min(R`,G`,B`)
Δ=Cmax-Cmin
V=Cmax
Wherein, the gray value R epsilon [0, 255] of the red channel, the gray value G epsilon [0, 255] of the green channel, and the gray value B epsilon [0, 255] of the blue channel; hue H epsilon [0,2 pi ], saturation S epsilon [0,1], brightness V epsilon [0,1];
The judging of the material color based on the color deformation material image HSV model comprises the following steps:
acquiring a histogram H of a gray value range of a material image under the H channel within [ H minb,Hmaxb ];
Acquiring a histogram H P of a gray value range of a material image under an S channel within [ S minP,SmaxP ];
acquiring a histogram H NG of a gray value range of a material image under an S channel within [ S minNG,SmaxNG ];
Judging the color of the material based on the gray value histogram of the H channel image and the gray value histogram of the S channel image;
Wherein [ H minb,Hmaxb ] is a blue gray value interval under the H channel, [ S minP,SmaxP ] is a pink gray value interval under the S channel, and [ S minNG,SmaxNG ] is a white gray value interval under the S channel;
the judging of the material color based on the gray value histogram of the H channel image and the gray value histogram of the S channel image comprises the following steps:
when judging that H is larger than a given threshold H B, considering the material to be blue;
When the material is not blue, judging whether H P is larger than H NG, if so, considering the material as pink; otherwise, the material is considered to be absent;
The center point and the inclination angle of the material obtained based on the material area comprise:
Obtaining a minimum circumscribed rectangle of the area based on the material area, and obtaining a row and column value [ V r_sr,Vc_sr ] and an inclination angle theta of a central point of the minimum circumscribed rectangle;
Constructing a straight line in the horizontal direction and the vertical direction based on the central point row-column value [ V r_sr,Vc_sr ] and the inclination angle theta of the minimum circumscribed rectangle;
the straight line formula in the horizontal direction is as follows: y=k h×x+bh;
Wherein the slope k h =tan θ of the horizontal straight line, the intercept b h=(H-Vr_sr)-kh×Vc_sr of the straight line on the y-axis, H is the pixel width of the image;
The straight line formula in the vertical direction is as follows:
y=kv×x+bv,abs(θ)>0.01°,
X=Vc_sr,abs(θ)≤0.01°;
Wherein the slope of the straight line in the vertical direction
The intercept b V=(H-Vr_sr)-Kv×Vc_sr of the line on the y-axis, H, is the pixel width of the image;
Through gray value traversal, traversing outwards along straight lines in the horizontal and vertical directions from the minimum circumscribed rectangular central point, and acquiring row and column values of four intersection points of straight lines in the horizontal and vertical directions and material edges based on positions of gray value abrupt change: the upper point [ V r_t,Vc_t ], the lower point [ V r_b,Vc_b ], the left point [ V r_l,Vc_l ], the right point [ V r_r,Vc_r ], and then the accurate row and column value [ R m,Cm ] of the center point of the material are obtained, and the formula is as follows:
Rm=(Vr_t+Vr_b)/2,
Cm=(Vc_l+Vc_r)/2。
2. the positioning method based on the color deformation material image positioning algorithm according to claim 1, wherein the positioning method comprises the following steps: the gray threshold judging material area based on the color deformation material image HSV model sequentially comprises:
preprocessing the image by mean filtering, and reducing noise interference of background details;
The image region R is subjected to threshold segmentation by using a gray threshold S min、Smax under the S channel to obtain a region R S containing materials after filtering out a background region, wherein the formula is as follows: s min<RS<Smax;
The noise influence of the trough is filtered by using a gray threshold H min、Hmax under the H channel, and an area R SH after S channel and H channel filtering is obtained, wherein the formula is as follows: h min<RSH<Hmax;
The noise influence of the black edge part of the material is filtered out by using a gray threshold V min、Vmax under the V channel, and a material region R SHV is obtained, wherein the formula is as follows: v min<RSHV<Vmax;
selecting a region with the largest area after filtering the material region, filtering noise influence of peripheral materials, and obtaining a material region with accurate target materials;
When the material is blue, a threshold value of the blue material is called, S min、Smax is a gray value range of the blue material under an S channel, H min、Hmax is a gray value range of the blue material under an H channel, and V min、Vmax is a gray value range of the blue material under a V channel; when the material is pink, a threshold value of the pink material is called, S min、Smax is a gray value range of the pink material under the S channel, H min、Hmax is a gray value range of the pink material under the H channel, and V min、Vmax is a gray value range of the pink material under the V channel.
3. A positioning system based on a color deformation material image positioning algorithm is characterized in that: a positioning method for implementing a color deformation material image based positioning algorithm as claimed in claim 1, the positioning system comprising: the device comprises a computer, an industrial robot, a camera, a grabbing device, a transparent material tray and a surface light source;
the surface light source is arranged on a panel of the operation table, and the transparent tray is arranged above the surface light source and is used for providing a transparent background for the color deformation materials; the industrial robot comprises a machine body and a mechanical arm, wherein the bottom of the machine body is fixedly connected to an operation table, and the mechanical arm is perpendicular to the operation table and is fixedly connected to the machine body; the camera is mounted on the mechanical arm, and the lens of the camera is horizontally aligned with the operation table; the grabbing device is arranged at the tail end of the manipulator close to one side of the operation table; the computer is respectively and electrically connected with the industrial robot, the camera and the grabbing device, and the camera is used for acquiring the color deformation material image and sending the image to the computer; the computer sequentially acquires a color deformation material image HSV model, judges the color of a material based on the color deformation material image HSV model, judges a material area based on the gray threshold of the color deformation material image HSV model and acquires the center point and the inclination angle of the material based on the material area to obtain positioning information, and sends the positioning information to the industrial robot and the grabbing device.
4. A positioning system based on a color deformation material image positioning algorithm according to claim 3, wherein: the industrial robot adopts a six-axis industrial robot.
5. A positioning system based on a color deformation material image positioning algorithm according to claim 3, wherein: the camera adopts a USB industrial camera.
6. A positioning system based on a color deformation material image positioning algorithm according to claim 3, wherein: the grabbing device adopts a sucker.
CN202211072170.1A 2022-09-02 2022-09-02 Positioning method and system based on color deformation material image positioning algorithm Active CN115439529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211072170.1A CN115439529B (en) 2022-09-02 2022-09-02 Positioning method and system based on color deformation material image positioning algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211072170.1A CN115439529B (en) 2022-09-02 2022-09-02 Positioning method and system based on color deformation material image positioning algorithm

Publications (2)

Publication Number Publication Date
CN115439529A CN115439529A (en) 2022-12-06
CN115439529B true CN115439529B (en) 2024-06-28

Family

ID=84247371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211072170.1A Active CN115439529B (en) 2022-09-02 2022-09-02 Positioning method and system based on color deformation material image positioning algorithm

Country Status (1)

Country Link
CN (1) CN115439529B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN211867832U (en) * 2020-04-02 2020-11-06 南京佳和牙科技术有限公司 Dental material identification and pickup device based on machine vision

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7555159B2 (en) * 2001-11-07 2009-06-30 Davar Pishva Image highlight correction using illumination specific HSV color coordinate
CN106503719B (en) * 2016-09-27 2020-12-25 南昌青橙视界科技有限公司 Object color extraction and detection method and device
CN107301634A (en) * 2017-06-28 2017-10-27 湖南瑞森可机器人科技有限公司 A kind of robot automatic sorting method and system
CN109308711B (en) * 2017-07-26 2021-11-05 富士通株式会社 Target detection method, device and image processing device
CN108890692A (en) * 2018-07-05 2018-11-27 陕西大中科技发展有限公司 A kind of material color identification method for industrial robot vision's sorting
CN113689365B (en) * 2021-08-23 2022-06-21 南通大学 A target tracking and positioning method based on Azure Kinect

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN211867832U (en) * 2020-04-02 2020-11-06 南京佳和牙科技术有限公司 Dental material identification and pickup device based on machine vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任慧娟 等.基于颜色特征的筒纱分拣机器人识别定位方法.《轻工机械》.2020,第38卷(第4期),第1-5节. *
基于颜色特征的筒纱分拣机器人识别定位方法;任慧娟 等;《轻工机械》;20200831;第38卷(第4期);第1-5节 *

Also Published As

Publication number Publication date
CN115439529A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
CN110497187B (en) Sunflower module assembly system based on vision guidance
CN110648367A (en) Geometric object positioning method based on multilayer depth and color visual information
CN105149794B (en) A kind of Intelligent Laser method for cutting edge based on binocular vision
CN108416809B (en) Steel drum threaded cap pose recognition method based on machine vision
JP4309439B2 (en) Object take-out device
CN113771045B (en) Vision-guided right-angle robot mobile phone middle frame height adaptive positioning and grasping method
US20210150700A1 (en) Defect detection device and method
CN114758236B (en) Non-specific shape object identification, positioning and manipulator grabbing system and method
CN112304960B (en) High-resolution image object surface defect detection method based on deep learning
EP3910593A1 (en) Image processing device, work robot, substrate inspection device, and specimen inspection device
CN1959740A (en) Image processing method and device, program for processing image, and storage medium thereof
Hsu et al. Development of a faster classification system for metal parts using machine vision under different lighting environments
JP7036477B1 (en) Defect detection method, defect detection system, and defect detection program
CN112304957A (en) Machine vision-based intelligent detection method and system for appearance defects
CN112883881A (en) Disordered sorting method and device for strip-shaped agricultural products
US10969278B2 (en) Spectroscopic inspection method, image processing apparatus, and robot system
CN109584296A (en) A kind of fork truck identification distance measuring method based on monocular vision
CN115439529B (en) Positioning method and system based on color deformation material image positioning algorithm
CN112541942A (en) Distance transformation-based traditional Chinese medicine pill visual guidance positioning method
CN115187556A (en) Method for positioning parts and acquiring point cloud on production line based on machine vision
CN106413280B (en) Automatic correction device and automatic correction method for component position of placement machine feeder
CN116594351A (en) A NC Machining Unit System Based on Machine Vision
CN109592342B (en) Visual cylindrical material conveying method
JP2519445B2 (en) Work line tracking method
KR102710889B1 (en) Defect detection system for transparent materials using pattern scanning lighting

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
CB02 Change of applicant information

Address after: Room 02, 4th Floor, Building A3, Nanshan Zhiyuan, No. 1001 Xueyuan Avenue, Changyuan Community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province, 518000

Applicant after: Jing Ke (Shenzhen) robot technology Co.,Ltd.

Address before: 518100 Room 403, building 7, Jinxiu Dadi, No. 117, Hudi row, songyuanxia community, Guanhu street, Longhua District, Shenzhen, Guangdong Province

Applicant before: Jing Ke (Shenzhen) robot technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant