Character collecting and reading device and character collecting and reading method
By designing a character acquisition and reading device, using industrial camera components and preset software, the identification and statistics problems when there is no QR code or QR code on the product falls off, and automated identification and statistics are realized, improving convenience and accuracy.
Patent Information
- Application Number
- CN202411667466.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, when there is no QR code or QR code on the product, the product cannot be identified and counted, resulting in inconvenience in statistics.
Design a character acquisition and reading device, including a housing, a drive assembly, an industrial camera assembly, a tool fixture and an adjustable light source assembly, obtain product character information through the industrial camera assembly, and identify and count through preset software.
Even if there is no QR code on the product, the identification and statistics of the product can be automatically completed, improving the accuracy and convenience of the identification.
Smart Images

Figure CN119942549A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of character recognition, and in particular to a character acquisition and reading device and a character acquisition and reading method. Background Art
[0002] Since the industrial revolution, people's ability and speed in producing products have been significantly improved, so a large number of identical products can be produced in a relatively short period of time. In order to distinguish multiple identical products, we usually register the products with numbers to facilitate statistics of identical products.
[0003] Later, in order to make statistics more efficient and convenient, people invented barcode guns. After sorting the same products according to preset rules, a QR code was formed. The QR code was pasted or printed on the product. The QR code can be quickly identified by scanning the QR code with a barcode gun, making statistics simpler and more efficient. However, if there is no QR code on the product or the QR code falls off, it is impossible to count the product. Summary of the invention
[0004] Based on this, it is necessary to provide a character collection and reading device and a character collection and reading method, which can identify and count products even when there is no QR code on the product.
[0005] A character acquisition and reading device comprises a housing, a drive assembly, an industrial camera assembly, a tooling fixture, and at least two adjustable light source assemblies; The shell is an open structure on one side, the driving assembly is installed in the shell, the industrial camera assembly is installed on the driving assembly, and is moved along the vertical direction by the driving assembly. The tooling fixture is installed at the bottom of the shell and corresponds to the industrial camera assembly in the vertical direction, and the adjustable light source assembly is symmetrically arranged on both sides of the shell.
[0006] In one embodiment, the driving assembly includes a cylinder, a slide rail and a slider. The cylinder and the slide rail are respectively arranged at preset positions of the shell. The slider is slidably arranged on the slide rail. One end of the industrial camera assembly is fixedly connected to the telescopic rod of the cylinder, and the bottom is arranged on the slider.
[0007] In one embodiment, the industrial camera assembly includes a mounting seat, a rotating shaft and an industrial camera, the mounting seat is mounted on the slider, the rotating shaft passes through the mounting seat, the industrial camera is mounted on the rotating shaft, and the rotating shaft is used to drive the industrial camera to rotate a preset angle.
[0008] In one of the embodiments, the tooling fixture is provided with a receiving groove, and the receiving groove is used to place the product to be identified.
[0009] In one embodiment, the adjustable light source assembly includes a Z-axis support plate, an X-axis support plate, a fixed seat, and a light source, the Z-axis support plate is installed on the inner layer of the shell, the X-axis support plate is detachably installed on the Z-axis support plate and can be moved along the Z-axis direction of the Z-axis support plate, the fixed seat is detachably installed on the X-axis support plate and can be moved along the X-axis direction of the X-axis support plate, and the light source is rotatably set on the fixed seat.
[0010] In one of the embodiments, the fixing seat is symmetrically provided with arc-shaped through holes, and the side surface of the light source is provided with fixing holes at positions matching the arc-shaped through holes.
[0011] A character collection and reading method of a character collection and reading device, applied to the character collection and reading device, the character collection and reading method comprising: Select the Mark point on the product to be identified; Determine the coordinates of the Mark point and the coordinates of the character to be recognized relative to the Mark point; Identify the Mark point binary image and simplify the binary image; Analyze the edge information in the input Mark point binary image and generate a shape model; Identify product image information and obtain image information identical to the shape model and mark it as identification mark points; Acquire identification mark point information, wherein the identification mark point information includes identification mark point coordinates, rotation angle, and similarity information with the shape model; Determine whether the coordinates of the Mark point are the same as the coordinates of the identification Mark point. If yes, proceed to the next step; Determine the relative coordinates of the character to be recognized by identifying the Mark point coordinates; Determine the character to be recognized by the relative coordinates of the character to be recognized; Get the character information to be recognized.
[0012] In one embodiment, the Mark point coordinates are determined to be the same as the identification Mark point coordinates. If not, the rotation angle of the identification Mark point is determined, and the identification Mark point shape model is rotated to make it coincide with the Mark point shape model.
[0013] In one embodiment, the method for identifying the Mark point binary image and simplifying the binary image is: Identify the binary image of Mark points; Convert the RGB color space image of a binary image to a grayscale image.
[0014] In one embodiment, the method for obtaining the character information to be recognized is: Calculate the average value of pixels in the character area to generate an image after mean filtering; Determine the front background color and the back background color through the processed image; Obtain a window of a specified size on the image to calculate the mean and standard deviation of the pixels in the window; Determine an average threshold of the image by using the mean and standard deviation; Separate the front and back background colors according to the average threshold information and extract the front background color part; Through the trained character library, optical character recognition is performed on the foreground and background color parts.
[0015] The above-mentioned character acquisition and reading device places the product to be identified on the tooling fixture through the coordinated setting of the driving component, the industrial camera component, the tooling fixture, and at least two adjustable light source components, adjusts the industrial camera component to a preset position through the driving component, and obtains the preset character information of the product to be identified through the industrial camera component, and obtains the character information through the preset software in the industrial camera component, thereby completing the identification and statistics of the product to be identified. Even if there is no QR code on the product, the identification and statistics of the product can be automatically completed, making the applicability of the character acquisition and reading device more extensive and convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the assembly structure of a character collection and reading device according to an embodiment of the present invention; Figure 2 for Figure 1 A schematic diagram of the assembly structure of a driving component and an industrial camera component of a character acquisition and reading device according to an embodiment of the present invention; Figure 3 for Figure 1 A schematic structural diagram of an adjustable light source assembly of a character collection and reading device according to an embodiment of the present invention; Figure 4 for Figure 1 A flow chart of a character collection and reading method of a character collection and reading device according to an embodiment of the present invention; Figure 5 for Figure 1 A flowchart of obtaining information of characters to be recognized in a character collection and reading method of a character collection and reading device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0018] It should be noted that when an element is considered to be "connected" to another element, it may be directly connected to the other element or there may be an intermediate element at the same time. On the contrary, when an element is said to be "directly" connected to another element, there is no intermediate element.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0020] like Figure 1 , Figure 2 , Figure 3 As shown, a character acquisition and reading device includes a housing 1, a drive assembly 2, an industrial camera assembly 3, a tooling fixture 4, and at least two adjustable light source assemblies 5; The shell 1 is an open structure on one side, the driving assembly 2 is installed in the shell 1, the industrial camera assembly 3 is installed on the driving assembly 2, and is moved in the vertical direction by the driving assembly 2. The tooling fixture 4 is installed at the bottom of the shell 1 and corresponds to the industrial camera assembly 3 in the vertical direction. The adjustable light source assembly 5 is symmetrically arranged on both sides of the shell 1.
[0021] In one embodiment, the driving assembly 2 includes a cylinder, a slide rail 22 and a slider 23. The cylinder and the slide rail 22 are respectively arranged at preset positions of the housing 1. The slider 23 is slidably arranged on the slide rail 22. One end of the industrial camera assembly 3 is fixedly connected to the telescopic rod of the cylinder, and the bottom is arranged on the slider 23. When the cylinder is started, the telescopic rod of the cylinder can drive the industrial camera assembly 3 to slide on the slide rail 22 through the slider 23, thereby adjusting the distance between the industrial camera assembly 3 and the product to be identified to achieve a better image recognition effect.
[0022] In one embodiment, the industrial camera assembly 3 includes a mounting seat 31, a rotating shaft 32 and an industrial camera 33. The mounting seat 31 is installed on the slider 23, the rotating shaft 32 is passed through the mounting seat 31, and the industrial camera 33 is installed on the rotating shaft 32. The rotating shaft 32 is used to drive the industrial camera 33 to rotate a preset angle.
[0023] The industrial camera 33 is used to identify the image to be identified on the product. After identifying the image on the product, the industrial camera 33 analyzes the image to be identified through software, obtains product information, and performs product statistics. The shaft 32 is rotated by external force, and the industrial camera 33 can be driven to rotate by a preset angle at the same time. When the product placement position is deviated, the shaft 32 can also be rotated, thereby driving the industrial camera 33 to rotate by a preset angle, so as to facilitate product identification.
[0024] In one embodiment, the jig 4 is provided with a receiving groove 41, and the receiving groove 41 is used to place the product to be identified.
[0025] In this way, by providing the receiving groove 41 , the position of the product to be identified can be made more accurate, and the position offset of the product to be identified can be effectively avoided, which increases the difficulty of acquiring the product image.
[0026] In one embodiment, the adjustable light source assembly 5 includes a Z-axis support plate 51, an X-axis support plate 52, a fixed seat 53, and a light source 54. The Z-axis support plate 51 is installed on the inner layer of the shell 1, the X-axis support plate 52 is detachably installed on the Z-axis support plate 51 and can be moved along the Z-axis direction of the Z-axis support plate 51, the fixed seat 53 is detachably installed on the X-axis support plate 52 and can be moved along the X-axis direction of the X-axis support plate 52, and the light source 54 is rotatably set on the fixed seat 53.
[0027] The fixing seat 53 is symmetrically provided with arc-shaped through holes 531 , and the side surface of the light source 54 is provided with fixing holes 541 at positions matching with the arc-shaped through holes 531 .
[0028] The adjustable light source assembly 5 is mainly used to provide a stable light source for the product to be identified. The Z-axis support plate 51 and the X-axis support plate 52 are both provided with waist-shaped holes, so that the light source 54 can move in the X-axis direction and the Z-axis direction. By adjusting the irradiation position of the light source 54 according to the position of the product, a better irradiation light source can be provided for the product to be tested.
[0029] Furthermore, the light source 54 can also adjust the irradiation angle of the light source 54 by rotating on the fixing seat 53. The fixing hole 541 can move along the track of the arc-shaped through hole 531. When the light source 54 moves to a desired position, one end of an external fixing member can be inserted into the fixing hole 541, and the other end can be abutted against the arc-shaped through hole 531, so that the light source 54 cannot rotate. When the light source 54 needs to rotate again, the fixing member can be pulled out so that the light source 54 can continue to rotate.
[0030] In this way, the character acquisition and reading device, through the coordinated setting of the driving component 2, the industrial camera component 3, the tooling fixture 4, and at least two adjustable light source components 5, places the product to be identified on the tooling fixture 4, adjusts the industrial camera component to the preset position through the driving component 2, and obtains the preset character information of the product to be identified through the industrial camera component 3, and obtains the character information through the preset software in the industrial camera component 3, thereby completing the identification and statistics of the product to be identified. Even if there is no QR code on the product, the identification and statistics of the product can be automatically completed, making the applicability of the character acquisition and reading device more extensive and convenient.
[0031] like Figure 4 As shown, a character collection and reading method of a character collection and reading device is applied to the character collection and reading device, and the character collection and reading method includes: S1. Select a Mark point on the product to be identified. The Mark point is a mark that all identical products have, which can facilitate the identification of all products. For example, if the Mark point is the three words "Serial Number", then the characters to be identified are the specific serial number next to the three words "Serial Number"; S2, determine the coordinates of the Mark point and the coordinates of the character to be recognized relative to the Mark point; S3, identify the binary image of the Mark point and simplify the binary image; convert the image of the Mark point binary image RGB color space into a grayscale image. The RGB color space consists of three channels: red, green, and blue, while the grayscale image only contains brightness information, which can greatly simplify the image processing task because it reduces the amount of data and highlights the contours and textures of the image; S4. Analyze the edge information in the input Mark point binary image and generate a shape model; this shape model can describe the geometric characteristics of the shape and search for matching shapes in subsequent images. At the same time, the software processing method determines the complexity and rotation invariance of the model.
[0032] S5, identify product image information and obtain image information identical to the shape model and mark it as the identified Mark point; after capturing real-time image information, the software automatically processes the image information and searches for instances matching the shape of the given Mark point in the real-time image information through the shape model information in S4. The target object is located by comparing the area in the search image information with the features of the shape model; S6, obtaining the identification Mark point information, wherein the identification Mark point information includes the identification Mark point coordinates, rotation angle, and similarity information with the shape model; S7, judging whether the coordinates of the Mark point are the same as the coordinates of the identification Mark point, if yes, proceeding to the next step; S8. Determine the relative coordinates of the character to be recognized by identifying the coordinates of the Mark point; the relative coordinates of the character to be recognized can be obtained by identifying the coordinates of the Mark point, and the position of the character to be recognized can be determined by the relative coordinates. This method is the best way to solve the problem of the character position not being recognized due to the uncertainty of the product placement position, which greatly improves the versatility of the software; S9, determining the character to be recognized by the relative coordinates of the character to be recognized; S10, obtaining information of characters to be recognized.
[0033] In one of the embodiments, the Mark point coordinates are determined to be the same as the identification Mark point coordinates. If not, the rotation angle of the identification Mark point is determined, and the identification Mark point shape model is rotated to coincide with the Mark point shape model. When the Mark point coordinates are different from the identification Mark point coordinates, the system believes that the placement of the product has shifted, and by determining the offset angle between the identification Mark point shape model and the Mark point shape model, the identification Mark point shape model is rotated to coincide with the Mark point shape model, and then the identification Mark point coordinates are determined. If the Mark point coordinates are the same as the identification Mark point coordinates, the coordinates of the character to be identified are determined by the identification Mark point coordinates.
[0034] Furthermore, when the similarity between the identified Mark point and the Mark point shape model is greater than a preset threshold, it is determined whether the identified Mark point coordinates are the same as the Mark point coordinates. If the shape model similarity is less than the preset threshold, it is confirmed that the identified Mark point and the Mark point are not the same.
[0035] In one embodiment, the method for identifying the Mark point binary image and simplifying the binary image is: Identify the binary image of Mark points; Convert the RGB color space image of a binary image to a grayscale image.
[0036] like Figure 5 As shown, in one embodiment, the method for obtaining the character information to be recognized is: S11, calculating the average value of pixels in the character area to generate an image after mean filtering; S12, determining the front background color and the back background color through the processed image; S13, obtaining a window of a specified size on the image to calculate the mean and standard deviation of the pixels in the window; S14, determining an average threshold of the image by using the mean and the standard deviation; S15, separating the front and back background colors according to the average threshold information and taking out the front background color part; S16. Perform optical character recognition on the foreground and background color parts using a trained character library.
[0037] After determining the position of the character, calculate the average value of the pixels in the character area, generate an image after mean filtering, determine the foreground and back background colors through the processed image, use a window (mask) of a specified size to calculate the mean and standard deviation of the pixels in the window, and then determine the average threshold of the image based on the mean and standard deviation. For example, a byte is generally 0-255, so if it is white, it will be biased towards the 255 side, and if it is black, it will be biased towards the 0 side. Generally, the back background color accounts for a larger proportion, and the front background color accounts for a smaller proportion, so the average threshold will be more biased towards the back background color. If the calculated average threshold is 50, then the back background color is black, and white is the front background color, so the front background color is separated. Take out the front background color part (that is, the character part to be recognized), and perform optical character recognition on it through the actively trained character library.
[0038] Furthermore, when all products after the first product are placed in the fixture, there is no need to manually re-select the Mark point. You only need to click the automatic recognition button in the software to re-recognize the exact position of the product's characters and read the characters out, which greatly saves human resources and speeds up the recognition speed. When there is a problem with the product placement position, the software will automatically determine the character position and accurately recognize the character content, greatly optimizing the versatility and error correction function of the software product and preventing the software from being unsuitable due to manual misoperation.
[0039] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A character collection and reading device, characterized in that: It includes a housing, a driving assembly, an industrial camera assembly, a tooling fixture, and at least two adjustable light source assemblies; The shell is an open structure on one side, the driving assembly is installed in the shell, the industrial camera assembly is installed on the driving assembly, and is moved along the vertical direction by the driving assembly. The tooling fixture is installed at the bottom of the shell and corresponds to the industrial camera assembly in the vertical direction, and the adjustable light source assembly is symmetrically arranged on both sides of the shell.
2. A character collection and reading device according to claim 1, characterized in that: The driving assembly includes a cylinder, a slide rail and a slider. The cylinder and the slide rail are respectively arranged at preset positions of the shell. The slider is slidably arranged on the slide rail. One end of the industrial camera assembly is fixedly connected to the telescopic rod of the cylinder, and the bottom is arranged on the slider.
3. A character collection and reading device according to claim 2, characterized in that: The industrial camera assembly includes a mounting seat, a rotating shaft and an industrial camera. The mounting seat is mounted on the slider, the rotating shaft passes through the mounting seat, the industrial camera is mounted on the rotating shaft, and the rotating shaft is used to drive the industrial camera to rotate a preset angle.
4. A character collection and reading device according to claim 1, characterized in that: The tooling fixture is provided with a receiving groove, and the receiving groove is used to place the product to be identified.
5. A character collection and reading device according to claim 1, characterized in that: The adjustable light source assembly includes a Z-axis support plate, an X-axis support plate, a fixed seat, and a light source. The Z-axis support plate is installed on the inner layer of the shell, the X-axis support plate is detachably installed on the Z-axis support plate and can be moved along the Z-axis direction of the Z-axis support plate, the fixed seat is detachably installed on the X-axis support plate and can be moved along the X-axis direction of the X-axis support plate, and the light source is rotatably set on the fixed seat.
6. A character collection and reading device according to claim 5, characterized in that: The fixing seat is symmetrically provided with arc-shaped through holes, and the side surface of the light source is provided with fixing holes at positions matching with the arc-shaped through holes.
7. A character collection and reading method of a character collection and reading device, characterized in that: Applied to the character collection and reading device according to any one of claims 1 to 6, the character collection and reading method comprises: Select the Mark point on the product to be identified; Determine the coordinates of the Mark point and the coordinates of the character to be recognized relative to the Mark point; Identify the Mark point binary image and simplify the binary image; Analyze the edge information in the input Mark point binary image and generate a shape model; Identify product image information and obtain image information identical to the shape model and mark it as identification mark points; Acquire identification mark point information, wherein the identification mark point information includes identification mark point coordinates, rotation angle, and similarity information with the shape model; Determine whether the coordinates of the Mark point are the same as the coordinates of the identification Mark point. If yes, proceed to the next step; Determine the relative coordinates of the character to be recognized by identifying the Mark point coordinates; Determine the character to be recognized by the relative coordinates of the character to be recognized; Get the character information to be recognized.
8. The character collection and reading method of the character collection and reading device according to claim 7, characterized in that: The determination mark point coordinates are the same as the identification mark point coordinates. If not, the rotation angle of the identification mark point is determined, and the identification mark point shape model is rotated to make it coincide with the mark point shape model.
9. The character collection and reading method of the character collection and reading device according to claim 7, characterized in that: The method for identifying the binary image of the Mark point and simplifying the binary image is as follows: Identify the binary image of Mark points; Convert the RGB color space image of a binary image to a grayscale image.
10. The character collection and reading method of the character collection and reading device according to claim 7, characterized in that: The method for obtaining the character information to be recognized is: Calculate the average value of pixels in the character area to generate an image after mean filtering; Determine the front background color and the back background color through the processed image; Obtain a window of a specified size on the image to calculate the mean and standard deviation of the pixels in the window; Determine an average threshold of the image by using the mean and standard deviation; Separate the front and back background colors according to the average threshold information and extract the front background color part; Through the trained character library, optical character recognition is performed on the foreground and background color parts.