CN115170551A - Product detection and tracing method and system based on visual technology calibration - Google Patents

Product detection and tracing method and system based on visual technology calibration Download PDF

Info

Publication number
CN115170551A
CN115170551A CN202210921943.2A CN202210921943A CN115170551A CN 115170551 A CN115170551 A CN 115170551A CN 202210921943 A CN202210921943 A CN 202210921943A CN 115170551 A CN115170551 A CN 115170551A
Authority
CN
China
Prior art keywords
calibration
distance
product
preset
presetting
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
CN202210921943.2A
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.)
Wenzhou Polytechnic
Original Assignee
Wenzhou Polytechnic
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 Wenzhou Polytechnic filed Critical Wenzhou Polytechnic
Priority to CN202210921943.2A priority Critical patent/CN115170551A/en
Publication of CN115170551A publication Critical patent/CN115170551A/en
Pending legal-status Critical Current

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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • 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/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Abstract

The invention provides a product detection and tracing method and system based on visual technology calibration, and relates to the technical field of visual detection. Comprises presetting a calibration block; finding a reference point on the calibration block, and measuring a plurality of known positions to obtain absolute position information relative to the reference point; after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located; after entering a visual measurement range, a camera acquires a picture corresponding to a product, performs chromatic aberration preprocessing on the picture, extracts a plurality of required boundaries to be detected from a calibration block according to the chromatic aberration principle, and calculates the distance of a preset index in the boundaries; presetting custom label information; and comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement. The detection efficiency is greatly improved, the problem products are traced, and the burden of manual detection is reduced.

Description

Product detection and tracing method and system based on visual technology calibration
Technical Field
The invention relates to the technical field of machine vision detection, in particular to a product detection and tracing method and system based on vision technology calibration.
Background
The application of visual inspection technology has entered various industries with the development of the times, wherein the production efficiency is increased especially for the inspection of industrial products. In the existing equipment vision technology, the calibration method is time-consuming and labor-consuming, and specifically, size information of an actually measured object is compared with a pixel value. By the method, when various products are detected and replaced, the problems of time consumption and great difficulty in operation technology are solved, and the efficiency in industrial production is greatly influenced.
Disclosure of Invention
The invention aims to provide a product detection and tracing method based on visual technology calibration, which utilizes the color difference to determine the product boundary so as to detect whether the product size reaches the standard.
The embodiment of the invention is realized by the following steps:
in a first aspect, an embodiment of the present application provides a product detection and tracing method based on visual technology calibration, which includes a camera with a preset fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area; searching a reference point on a calibration block, presetting a plurality of known positions, and measuring the known positions to obtain absolute position information relative to the reference point; after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located; fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance; performing visual measurement after receiving a trigger signal from a switch button; when a product enters a visual measurement range, a camera acquires a to-be-processed picture corresponding to the product, performs chromatic aberration preprocessing on the to-be-processed picture, extracts a plurality of required boundaries to be detected from a calibration block according to the chromatic aberration principle, and calculates the distance of a preset index in the boundaries; presetting custom label information; and comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
In some embodiments of the present invention, the step of extracting a plurality of required boundaries to be measured from the calibration block according to a color difference principle, and calculating a distance of a preset index in the boundaries includes: acquiring a target position region of interest of the ROI; carrying out gray level conversion and binarization processing on the whole image, finding the boundary of two target position areas on the image by utilizing chromatic aberration, and selecting one of the two target position areas as a measurement starting point and the other target position area as a measurement end point; and calculating the distance of the preset index by using the position coordinates of the pixel points of the measurement starting point and the measurement end point.
In some embodiments of the present invention, the distance of the preset index includes a straight line distance, an ordinate distance, and an abscissa distance.
In some embodiments of the invention, the step of finding the boundary of two target location areas on the image using color differences comprises: and processing and comparing the pixel points in the target position area in a traversing and circulating mode, if the pixel points accord with a preset threshold value, judging the pixel points to be a boundary, and if the pixel points do not accord with the preset threshold value, continuously traversing and circulating other pixels.
In some embodiments of the present invention, the step of presetting the custom tag information comprises: and presetting a custom terminal, and editing the content of the tag information by a user through the custom terminal.
In some embodiments of the present invention, the step of not printing otherwise comprises: and counting the detection times to generate the total yield of the product and the measured yield of the upper part of the product.
In some embodiments of the present invention, the method further comprises storing and backing up the yield value in the storage device.
In a second aspect, an embodiment of the present application provides a product detection and traceability system based on visual technology calibration, which includes a preset module, configured to preset a camera at a fixed position and a plurality of calibration blocks at fixed positions in a camera shooting area; the visual calibration module is used for searching a reference point on the calibration block, presetting a plurality of known positions, and measuring the plurality of known positions to obtain absolute position information relative to the reference point; after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located; fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance; the trigger module is used for carrying out visual measurement after receiving a trigger signal from the switch button; the image processing module is used for acquiring a picture to be processed corresponding to the product by a camera after the product enters a vision measurement range, performing color difference preprocessing on the picture to be processed, extracting a plurality of required boundaries to be detected from the calibration block according to a color difference principle, and calculating the distance of a preset index in the boundaries; the user-defined information editing module is used for presetting user-defined label information; and the result module is used for comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
In a third aspect, an embodiment of the present application provides an electronic device, including at least one processor, at least one memory, and a data bus; wherein: the processor and the memory complete mutual communication through a data bus; the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute a visual technology-based product detection and traceability method.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for product detection and tracing based on visual technology calibration.
Compared with the prior art, the embodiment of the invention has at least the following advantages or beneficial effects:
the design adopts a mode of taking any reference point within a fixed camera shooting range for visual calibration, so that the calibration is more convenient and the adaptability is higher, meanwhile, during distance testing, the design utilizes gray scale conversion and binarization processing of images, so that the images present obvious chromatic aberration, and the product boundary is determined by utilizing the chromatic aberration, so that whether the product size reaches the standard is detected, and compared with the current manual measurement, the detection efficiency is greatly improved, and the burden of manual detection is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a flow chart of a visual technology calibration-based product detection and tracing method according to the present invention;
FIG. 2 is a flow chart of image processing in the present invention;
FIG. 3 is a schematic diagram of boundary finding of a target location area in the present invention;
FIG. 4 is a schematic structural diagram of a product inspection and tracing system calibrated based on a vision technique according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to the present invention.
An icon: 1. presetting a module; 2. a vision calibration module; 3. a triggering module; 4. an image processing module; 5. a self-defined information editing module; 6. a result module; 7. a processor; 8. a memory; 9. a data bus; 10. binarizing the picture; 11. a black pattern; 12. a target location area.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
It should be noted that, in this document, the term "comprises/comprising" or any other variation thereof is intended to cover a non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
In the description of the present application, it is also to be noted that, unless otherwise explicitly specified or limited, the term "connected" is to be interpreted broadly, e.g. as a fixed connection, a detachable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments and features of the embodiments described below can be combined with one another without conflict.
Example 1
Referring to fig. 1, according to the product detection and tracing method based on the visual technology calibration provided by the embodiment of the present application, the calibration of the vision is performed by adopting any reference point within the fixed camera shooting range, so that the calibration is more convenient and faster, the adaptability is higher, meanwhile, during the distance test, the design utilizes the gray scale conversion and binarization processing of the image, so that the image presents an obvious chromatic aberration, and the product boundary is determined by utilizing the chromatic aberration, so as to detect whether the product size reaches the standard, compared with the current manual measurement, the product detection method is slow in speed, so that the detection efficiency is greatly improved, and the burden of manual detection is reduced. Meanwhile, the user can modify the detected comparison data conveniently by using the self-defined label information, and the tracing is more convenient.
S1: the method comprises the steps of presetting a camera with a fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area;
the camera with the fixed position is used for limiting the test range conveniently, and the limitation of the calibration block can effectively limit the range of the ROI (region of interest) to a certain extent, so that the condition that traversal circulation is carried out on unnecessary regions in the subsequent traversal circulation process is avoided, and the time is saved.
S2: searching a reference point on a calibration block, presetting a plurality of known positions, and measuring the known positions to obtain absolute position information relative to the reference point;
the step is the beginning of the visual calibration step, and any one of the reference points is searched, for example, if the reference point is taken as a coordinate, the rest known positions can be easily deduced according to the tested distance, and the absolute position information relative to the reference point can be easily calculated.
S3: after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located;
for calibration, the step of initial calibration is only to use the actual distance as a reference, and it is further required to recalibrate a plurality of known positions on the picture based on the original reference point to convert the relationship between the pixel distance and the actual distance after the image is shot.
S4: fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance;
because the slight difference of the pixel points of the image can influence the calculation, the image needs to be fitted into a straight line again, so that the straight line is fitted by adopting a least square method, and a relational expression of the actual distance and the pixel distance is obtained. If errors occur in the subsequent calibration process, manual error compensation can be performed.
S5: carrying out visual measurement after receiving a trigger signal from a switch button;
the workman only need press shift knob, just can carry out the signal and trigger, and this design acquiescence adopts the rising edge to trigger. Only after triggering can the actual visual measurement be made.
S6: when a product enters a visual measurement range, a camera acquires a to-be-processed picture corresponding to the product, performs chromatic aberration preprocessing on the to-be-processed picture, extracts a plurality of required boundaries to be detected from a calibration block according to the chromatic aberration principle, and calculates the distance of a preset index in the boundaries;
because the position of the fixed block is fixed, the fixed block only needs to be moved to the position to be measured for measuring any product, and the boundary can be directly identified by utilizing the chromatic aberration, so that the required distance is calculated.
S7: presetting custom label information;
the user can customize the content of the tag information, can be used for processing the measurement information of a plurality of products, does not need to start other programs, and only needs to switch the detection strategy and modify the product information in the system.
S8: and comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
Comparing the measurement result with the information result of the user, printing the label on the good product, and combining the detection result with the label content defined by the user by the printing information; if the measurement result does not accord with the comparison value (namely the preset requirement), the label is not printed; the content output by the printing label can be a bar code or a two-dimensional code.
Referring to fig. 2 and 3, in some embodiments of the present invention, the step of extracting a plurality of required boundaries to be measured from the calibration block according to the color difference principle, and calculating a distance of a preset index in the boundaries includes:
s61: acquiring a target position region 12 of interest of the ROI;
wherein the ROI refers to the term "region of interest" in image processing, which is a region to be processed extracted in an image to be processed; the coarse target position area 12 can be effectively positioned by utilizing the global chromatic aberration;
s62: carrying out gray level conversion and binarization processing on the whole image, finding the boundary of two target position areas 12 on the image by utilizing chromatic aberration, and selecting one of the two target position areas as a measurement starting point and the other target position area as a measurement end point;
and the gray scale conversion and the binarization processing directly convert the whole image into extreme colors approaching to black and white, and the color difference formed by the extreme colors does not receive the interference of other colors under the condition of setting a threshold value, so as to find the boundary of the target position area 12, as shown in fig. 3, a shadow area is a black graph 11 of the processed product, a dotted line is the target position area 12, and the color difference is formed in the binarization picture 10 with white bottom color, so as to perform boundary identification.
S63: and calculating the distance of the preset index by using the position coordinates of the pixel points of the measurement starting point and the measurement end point. The distance of the preset index includes a straight line distance, a vertical coordinate distance and a horizontal coordinate distance.
The size and the angle of position deviation between point positions can be effectively obtained after the three distance measurements are carried out, so that the data richness of fault analysis after detection is improved.
In some embodiments of the invention, the step of finding the boundary of two target location areas 12 on the image using chromatic aberration comprises: and processing and comparing the pixel points in the target position area 12 in a traversal and circulation mode, if the pixel points meet a preset threshold value, judging the pixel points to be a boundary, and if the pixel points do not meet the preset threshold value, continuing to traverse and circulate other pixels.
And for the accurate judgment of the chromatic aberration, any adjacent pixels are compared, and meanwhile, as some gray pixels still exist after gray conversion and binarization processing and the gray values are different, the setting of the comparison threshold value can directly avoid errors caused by the difference of the gray values.
In some embodiments of the present invention, the step of presetting the custom tag information includes: and presetting a custom terminal, and editing the content of the tag information by a user through the custom terminal. The user-defined terminal can be a mobile phone, a computer or other intelligent equipment, and editing and repairing performance of label information modification is improved.
In some embodiments of the present invention, the step of not printing otherwise comprises: and counting the detection times to generate the total yield of the product and the measured yield of the upper part of the product.
In some embodiments of the present invention, the method further comprises storing and backing up the yield value in the storage device. So that the data is reserved for facilitating subsequent calling.
Example 2
Referring to fig. 4, the product inspection and tracing system calibrated based on visual technology according to the present invention includes a preset module 1, configured to preset a camera with a fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area; the vision calibration module 2 is used for searching a reference point on the calibration block, presetting a plurality of known positions, and measuring the plurality of known positions to obtain absolute position information relative to the reference point; after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located; fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance; the trigger module 3 is used for carrying out visual measurement after receiving a trigger signal from the switch button; the image processing module 4 is used for acquiring a to-be-processed picture corresponding to the product by the camera after the product enters the visual measurement range, performing color difference preprocessing on the to-be-processed picture, extracting a plurality of required to-be-detected boundaries from the calibration block according to a color difference principle, and calculating the distance of a preset index in the boundaries; the custom information editing module 5 is used for presetting custom label information; and the result module 6 is used for comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
Example 3
Referring to fig. 5, an electronic device provided by the present invention includes at least one processor 7, at least one memory 8, and a data bus 9; wherein: the processor 7 and the memory 8 are communicated with each other through a data bus 9; the memory 8 stores program instructions executable by the processor 7, and the processor 7 calls the program instructions to execute a product detection and tracing method based on visual technology calibration. For example, the following steps are realized:
the method comprises the steps of presetting a camera with a fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area; searching a reference point on the calibration block, presetting a plurality of known positions, and measuring the known positions to obtain absolute position information relative to the reference point; after acquiring a picture, a camera sequentially finds a plurality of original known positions and generates pixel point intervals according to the reference points and pixels where the known positions are located; fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance; carrying out visual measurement after receiving a trigger signal from a switch button; when a product enters a visual measurement range, a camera acquires a to-be-processed picture corresponding to the product, performs chromatic aberration preprocessing on the to-be-processed picture, extracts a plurality of required boundaries to be detected from a calibration block according to the chromatic aberration principle, and calculates the distance of a preset index in the boundaries; presetting custom label information; and comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
Example 4
The present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor 7, implements a method for product inspection and traceability based on visual technology calibration. For example, the following steps are realized:
the method comprises the steps of presetting a camera with a fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area; searching a reference point on a calibration block, presetting a plurality of known positions, and measuring the known positions to obtain absolute position information relative to the reference point; after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located; fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance; carrying out visual measurement after receiving a trigger signal from a switch button; when a product enters a visual measurement range, a camera acquires a to-be-processed picture corresponding to the product, performs chromatic aberration preprocessing on the to-be-processed picture, extracts a plurality of required boundaries to be detected from a calibration block according to the chromatic aberration principle, and calculates the distance of a preset index in the boundaries; presetting custom label information; and comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. A product detection and tracing method based on visual technology calibration is characterized by comprising the following steps:
the method comprises the steps of presetting a camera with a fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area;
searching a reference point on the calibration block, presetting a plurality of known positions, and measuring the known positions to obtain absolute position information relative to the reference point;
after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located;
fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance;
performing visual measurement after receiving a trigger signal from a switch button;
when a product enters a vision measurement range, the camera acquires a picture to be processed corresponding to the product, performs chromatic aberration pretreatment on the picture to be processed, extracts a plurality of required boundaries to be detected from the calibration block according to the chromatic aberration principle, and calculates the distance of a preset index in the boundaries;
presetting custom label information;
and comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
2. The method as claimed in claim 1, wherein the step of extracting a plurality of required boundaries to be detected from the calibration block according to a color difference principle and calculating a distance between preset indexes in the boundaries comprises:
acquiring a target position region of interest of the ROI;
carrying out gray level conversion and binarization processing on the whole image, finding the boundary of two target position areas on the image by utilizing chromatic aberration, and selecting one of the two target position areas as a measurement starting point and the other target position area as a measurement end point;
and calculating the distance of a preset index by using the position coordinates of the pixel points of the measurement starting point and the measurement ending point.
3. The vision-technology-based calibrated product detecting and tracing method as claimed in claim 2, wherein the distance of the preset index includes a straight-line distance, a ordinate distance and an abscissa distance.
4. The vision-technology-based product detection and tracing method for calibration as claimed in claim 2, wherein the step of finding the boundary of two target location areas on the image using color difference comprises:
and processing and comparing the pixel points in the target position area in a traversing and circulating mode, if the pixel points accord with a preset threshold value, judging the pixel points to be a boundary, and if the pixel points do not accord with the preset threshold value, continuously traversing and circulating other pixels.
5. The visual technology calibration-based product detection and tracing method of claim 1, wherein the step of presetting custom label information comprises:
and presetting a custom terminal, and editing the content of the tag information by a user through the custom terminal.
6. The visual technology calibration based product detection and traceability method as claimed in claim 5, wherein the step of not printing otherwise comprises:
and counting the detection times to generate the total yield of the product and the measured yield of the upper part of the product.
7. The vision-technology-calibration-based product detection and tracing method of claim 6, further comprising storing and backing up the yield value in a storage device.
8. A product detection and traceability system based on visual technology calibration is characterized by comprising:
the device comprises a preset module, a control module and a display module, wherein the preset module is used for presetting a camera with a fixed position and a plurality of calibration blocks with fixed positions in a camera shooting area;
the visual calibration module is used for searching a reference point on the calibration block, presetting a plurality of known positions, and measuring the plurality of known positions to obtain absolute position information relative to the reference point; after the camera acquires the picture, sequentially finding a plurality of original known positions, and generating pixel point distances according to the reference points and pixels where the known positions are located; fitting a straight line by using a least square method to obtain a relational expression of an actual distance and a pixel distance;
the trigger module is used for carrying out visual measurement after receiving a trigger signal from the switch button;
the image processing module is used for acquiring a to-be-processed picture corresponding to a product by the camera after the product enters a visual measurement range, performing color difference preprocessing on the to-be-processed picture, extracting a plurality of required boundaries to be detected from the calibration block according to a color difference principle, and calculating the distance of a preset index in the boundaries;
the user-defined information editing module is used for presetting user-defined label information;
and the result module is used for comparing the detected calculation result with the label information, printing the label if the calculation result meets the preset requirement, and not printing the label if the calculation result does not meet the preset requirement.
9. An electronic device comprising at least one processor, at least one memory, and a data bus; wherein: the processor and the memory complete mutual communication through the data bus; the memory stores program instructions for execution by the processor, the processor calling the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202210921943.2A 2022-08-02 2022-08-02 Product detection and tracing method and system based on visual technology calibration Pending CN115170551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210921943.2A CN115170551A (en) 2022-08-02 2022-08-02 Product detection and tracing method and system based on visual technology calibration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210921943.2A CN115170551A (en) 2022-08-02 2022-08-02 Product detection and tracing method and system based on visual technology calibration

Publications (1)

Publication Number Publication Date
CN115170551A true CN115170551A (en) 2022-10-11

Family

ID=83478048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210921943.2A Pending CN115170551A (en) 2022-08-02 2022-08-02 Product detection and tracing method and system based on visual technology calibration

Country Status (1)

Country Link
CN (1) CN115170551A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115753812A (en) * 2022-11-01 2023-03-07 东方合智数据科技(广东)有限责任公司 Printing quality detection method and related equipment in paper packaging industry

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115753812A (en) * 2022-11-01 2023-03-07 东方合智数据科技(广东)有限责任公司 Printing quality detection method and related equipment in paper packaging industry
CN115753812B (en) * 2022-11-01 2023-08-18 东方合智数据科技(广东)有限责任公司 Printing quality detection method and related equipment in paper packaging industry

Similar Documents

Publication Publication Date Title
CN107014294B (en) Contact net geometric parameter detection method and system based on infrared image
CN102799867B (en) Meter pointer angle identification method based on image processing
CN111028213A (en) Image defect detection method and device, electronic equipment and storage medium
CN106546263B (en) A kind of laser leveler shoot laser line detecting method based on machine vision
CN109472271B (en) Printed circuit board image contour extraction method and device
CN104331695B (en) A kind of circle marker symbol shape quality detection method of robust
CN109752392B (en) PCB defect type detection system and method
CN109284718B (en) Inspection robot-oriented variable-view-angle multi-instrument simultaneous identification method
CN108871185B (en) Method, device and equipment for detecting parts and computer readable storage medium
CN112964724B (en) Multi-target multi-region visual detection method and detection system
CN109447062A (en) Pointer-type gauges recognition methods based on crusing robot
TWI673686B (en) Video type water ruler scale detecting and identifying system and method
CN115170551A (en) Product detection and tracing method and system based on visual technology calibration
CN113554667A (en) Three-dimensional displacement detection method and device based on image recognition
CN111221996B (en) Instrument screen vision detection method and system
CN107271445B (en) Defect detection method and device
CN110035281B (en) Dead pixel detection method and device and electronic equipment
CN105509657A (en) High-precision measurement method of scratch area and grayscale parameter of IC card chip
CN114119644A (en) Template matching method based on edge features
CN115375608A (en) Detection method and device, detection equipment and storage medium
CN113160223A (en) Contour determination method, contour determination device, detection device and storage medium
CN117333860A (en) Ship water gauge reading method and device based on deep learning
US10719707B2 (en) Pedestrian detection method and related monitoring camera
CN112013921B (en) Method, device and system for acquiring water level information based on water level gauge measurement image
CN115761468A (en) Water level detection system and method based on image segmentation and target detection technology

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