Camera module, method and device, code reading equipment and storage medium

By introducing a control module and a distance measurement module into the camera module of the code reading device, selecting a suitable camera module according to the distance for image acquisition, the problems of low recognition accuracy and poor compatibility in complex distance scenes in the prior art are solved, and the recognition effect of high-definition and good compatibility is achieved.

CN119729173APending Publication Date: 2025-03-28HANGZHOU HIKROBOT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411934170.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The camera modules of existing code reading devices are difficult to accurately, clearly and quickly identify identification codes in complex scenarios with low recognition accuracy and poor compatibility.

Method used

An imaging module is provided, including a control module, a distance measuring module and at least two imaging modules with different focal lengths. The control module determines the target camera module with a high degree of matching focal length and distance from the two camera modules based on the distance measurement module, and controls it to acquire image information.

Benefits of technology

It realizes that the same camera module has high recognition clarity at both close and long distances, and has good compatibility, avoids the problem that a single camera module cannot clearly image, and ensures the recognition accuracy of the identified objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729173A_ABST
    Figure CN119729173A_ABST
Patent Text Reader

Abstract

The invention discloses a camera module, a method, a device, a code reading device and a storage medium, relates to the technical field of machine vision, and is at least used for effectively realizing that the same camera module can have relatively high recognition definition in both a short distance and a long distance, has relatively good compatibility, avoids the problem that a single camera module may not perform clear imaging, and improves the recognition efficiency. And the recognition precision of the to-be-recognized object is ensured. The method comprises a control module, a distance measuring module and at least two camera modules with different focal lengths, the control module is respectively connected with the distance measuring module and each camera module; the distance measuring module is used for measuring the distance between the to-be-recognized object and the camera module; the control module is used for determining a target camera module from the at least two camera modules according to the distance, and controlling the target camera module to collect image information of the to-be-recognized object; the probability that the camera module is determined as the target camera module is positively correlated with the matching degree between the focal length of the camera module and the spacing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision technology, and in particular to a camera module, method, apparatus, code reading device and storage medium. Background Art

[0002] At present, the camera modules of industrial cameras, smart cameras, handguns, barcode scanners and other code reading devices can generally produce clear images at a fixed distance, and support the recognition of identification codes such as QR codes or barcodes at a fixed distance. However, in complex scenarios where identification codes may exist at a long distance or a short distance, these code reading devices often have difficulty in accurately, clearly and quickly recognizing identification codes, resulting in low recognition accuracy and poor compatibility. Summary of the invention

[0003] The embodiments of the present application provide a camera module, method, apparatus, code reading device and storage medium, which are at least used to effectively realize that the same camera module can have high recognition clarity at both close and long distances, have good compatibility, avoid the problem that a single camera module may not be able to form a clear image, and ensure the recognition accuracy of the object to be recognized.

[0004] To achieve the above objectives, the present application provides the following technical solutions:

[0005] In a first aspect, a camera module is provided, comprising: a control module, a distance measuring module, and at least two camera modules with different focal lengths. The control module is connected to the distance measuring module and each camera module respectively. The distance measuring module is used to measure the distance between the object to be identified and the camera module. The control module is used to determine a target camera module from at least two camera modules according to the distance, and control the target camera module to collect image information of the object to be identified. The probability that a camera module is determined as a target camera module is positively correlated with the matching degree between the focal length and the distance of the camera module.

[0006] In this technical solution, the control module can determine the camera module with a higher matching degree between focal length and distance from at least two camera modules as the target camera module according to the distance between the object to be identified and the camera module, thereby supporting clear imaging of the object to be identified and supporting accurate identification of the object to be identified. Based on this, the present application can effectively achieve that the same camera module can have high recognition clarity at both close and long distances, has good compatibility, avoids the problem that a single camera module may not be able to produce clear images, and ensures the recognition accuracy of the object to be identified.

[0007] In a possible embodiment, the camera module includes an image sensor, an automatic focusing lens, and a focusing module. The control module is further used to determine, from a plurality of preset imaging focal lengths corresponding to the target camera module, a preset imaging focal length corresponding to the preset spacing interval including the spacing as the target imaging focal length, and control the focusing module in the target camera module to adjust the focal length of the automatic focusing lens in the target camera module to the target imaging focal length, so as to improve the clarity of the image information collected by the target camera module; different preset imaging focal lengths correspond to different preset spacing intervals.

[0008] In a possible embodiment, the control module is also used to control the focusing module in the target camera module to adjust the target imaging focal length according to the clarity of the image information of the object to be identified collected by the target camera module, so as to improve the clarity of the image information collected by the target camera module.

[0009] In a possible embodiment, the at least two camera modules include a telephoto module and a short-focus module. The focal length of the telephoto module is greater than the focal length of the short-focus module. If the distance is greater than or equal to a preset distance, the target camera module is determined from the telephoto module, or if the distance is less than the preset distance, the target camera module is determined from the short-focus module. The focal length of the telephoto module is greater than or equal to 50 cm and less than or equal to 1500 cm; the focal length of the short-focus module is greater than or equal to 1.5 cm and less than 50 cm.

[0010] In a possible embodiment, the camera module further includes: an image data link control module. The control module is connected to each camera module through the image data link control module. The control module is also used to send indication information for indicating the target camera module to the image data link control module. The image data link control module is used to receive the image information collected by each camera module, and send the image information collected by the target camera module to the control module.

[0011] In a possible embodiment, the ranging module is specifically used to emit a ranging laser; the camera module is used to collect ranging image information of the object to be identified; the ranging image information includes the landing point information of the ranging laser on the surface of the object to be identified; the control module is also used to determine the distance based on the landing point information in the ranging image information.

[0012] In a possible embodiment, the ranging laser is a visible laser, and the visible laser point formed by the ranging module is used to calibrate the lens direction of the camera module.

[0013] In a possible embodiment, the camera module further includes: a fill light module. The control module is further used to control the fill light module to perform fill light when the target camera module is shooting.

[0014] In a second aspect, a camera method is provided, which is applied to a camera module, wherein the camera module includes at least two camera modules with different focal lengths. The method includes: obtaining a distance between an object to be identified and the camera module. Determining a target camera module from at least two camera modules according to the distance. The probability that a camera module is determined as a target camera module is positively correlated with the degree of matching between the focal length and the distance of the camera module. Controlling the target camera module to capture image information of the object to be identified.

[0015] In a third aspect, a camera device is provided, which is applied to a camera module, wherein the camera module includes at least two camera modules with different focal lengths. The device includes: an acquisition unit, a processing unit, and a control unit. The acquisition unit is used to acquire the distance of the object to be identified relative to the camera module. The processing unit is used to determine a target camera module from at least two camera modules based on the distance. The probability that a camera module is determined to be a target camera module is positively correlated with the matching degree between the focal length and the distance of the camera module. The control unit is used to control the target camera module to capture image information of the object to be identified.

[0016] In a fourth aspect, a code reading device is provided, comprising: a processor, and a camera module as provided in any possible embodiment of the first aspect. The processor is connected to a memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to identify an identification code in the image information collected by the camera module.

[0017] In a fifth aspect, a readable storage medium is provided for storing computer instructions. When the computer instructions are executed on a code reading device, the code reading device executes the imaging method provided in the second aspect.

[0018] In a sixth aspect, a computer program product is provided, comprising computer execution instructions, which, when executed on a computer device, enable the computer device to execute the imaging method provided in the second aspect.

[0019] The technical effects brought about by any implementation method in the second to sixth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of the structure of a camera module provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of the structure of another camera module provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of the structure of another camera module provided in an embodiment of the present application;

[0023] Figure 4 A schematic diagram of the structure of another camera module provided in an embodiment of the present application;

[0024] Figure 5 A schematic diagram of the structure of a code reading device provided in an embodiment of the present application;

[0025] Figure 6 A schematic diagram of a process flow of a camera method provided in an embodiment of the present application;

[0026] Figure 7 A schematic structural diagram of a camera device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0028] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0029] First of all, in order to facilitate the understanding of the present application, the relevant elements involved in the present application are described.

[0030] The camera has functions such as video recording, transmission and static image capture. After collecting images through the lens, the image can be processed by the photosensitive component circuit and control component in the camera, and further converted into a digital signal that can be recognized by the main control unit.

[0031] Automatic focus means that the focal length of the lens can be adjusted according to the actual distance between the subject and the lens, so that the subject can be clearly photographed at different distances.

[0032] The tuneable lens (T-Lens) is an adjustable optical lens based on thin-film piezoelectric micro-electro-mechanical system (TFP-MEMS). When voltage is applied to the thin film pressing piece attached to the glass film of the auto-focus lens, it will deform, thereby changing the shape and focal length of the lens, thereby realizing functions such as auto-focus and panoramic focus.

[0033] Secondly, the application scenarios involved in this application are briefly introduced.

[0034] At present, the traditional camera modules of industrial cameras, smart cameras, guns, barcode scanners and other code reading devices can generally produce clear images at a fixed distance and support the recognition of identification codes at a fixed distance. These traditional camera modules generally use a monocular fixed focus solution, that is, a single camera with a fixed focal length is used for shooting, resulting in a short recognition distance for the code reading device and high requirements for lens consistency, which cannot be applied to code reading in long-distance or close-distance scenes.

[0035] Even if some traditional camera modules have an autofocus function, they cannot accurately, clearly, and quickly identify the object under test in complex situations such as ultra-long distances and close distances. In addition, related autofocus solutions mainly use technologies such as liquid lenses, stepper motors, and voice coil motors (VCM). These technologies have slow focusing speeds and large equipment sizes, and cannot quickly and effectively focus to the appropriate focal length. They are also single cameras and cannot meet compatible scenarios for close-range and long-range recognition.

[0036] Next, the implementation environment (implementation architecture) involved in this application is briefly introduced.

[0037] like Figure 1 , which is a schematic diagram of the structure of a camera module provided in an embodiment of the present application. The camera module may include a control module 101, a distance measurement module 102, and at least two camera modules 103 with different focal lengths.

[0038] The control module 101 is connected to the distance measurement module 102 and each camera module 103 respectively.

[0039] The distance measurement module 102 is used to measure the distance between the object to be identified and the camera module.

[0040] It should be understood that at least two camera modules 103 may be deployed on the same plane. In this way, when the distance measuring module 102 measures the distance, the distances between the camera modules 103 and the object to be identified are the same.

[0041] The object to be identified may be an entity with detectable physical or behavioral characteristics. For example, the object to be identified may be a material box with an identification code such as a QR code or a barcode on the surface. For another example, the object to be identified may be a vehicle with a license plate number on the outside. For another example, the object to be identified may be an electronic device displaying an identification code such as a QR code or a barcode.

[0042] Optionally, when the object to be identified is a material box in a scene such as warehousing logistics or terminal logistics, considering that the distance between the object to be identified and the camera module is not fixed and the number of objects to be identified is large, the distances between different objects to be identified and the camera module are often different. In order to support the camera module to accurately capture clear images of the objects to be identified at various distances, the camera module is set to include at least two camera modules 103 with different focal lengths, so as to realize the switching recognition of objects to be identified at different distances.

[0043] Optionally, the distance measuring module 102 may be a laser distance measuring module, an ultrasonic distance measuring module or an infrared distance measuring module, etc. The ultrasonic distance measuring module may measure the distance by sending an ultrasonic signal and receiving the ultrasonic signal reflected by the object to be identified. The infrared distance measuring module may measure the distance by utilizing the reflection characteristics of infrared rays.

[0044] In the case where the ranging module 102 is a laser ranging module, the ranging module 102 can emit a laser to the object to be identified through a laser light to generate a landing point position on the object to be identified. When the distance between the camera module and the object to be identified changes, the landing point position generated by the laser light will also change. In the case where the laser light emission angle is fixed, the control module 101 can calculate the distance between the camera module and the object to be identified based on the laser light emission angle and the landing point position change to achieve laser ranging.

[0045] Specifically, the ranging module 102 can be used to emit a ranging laser. When the ranging laser is irradiated on the surface of the object to be identified, a landing point is formed. In this case, each of the at least two camera modules 103 can collect ranging image information of the object to be identified. Among them, the ranging image information includes the landing point information of the ranging laser on the surface of the object to be identified. In addition, each camera module 103 can send the collected ranging image information to the control module 101. Accordingly, the control module 101 can receive the ranging image information from each camera module 103, and identify the landing point position of the ranging laser in the received ranging image information, so as to further determine the distance between the camera module and the object to be identified.

[0046] In one possible manner, the control module 101 may also pre-store preset spacings corresponding to the landing points of the ranging laser at various positions in the ranging image information. In this way, after the control module 101 identifies the landing position of the ranging laser in the ranging image information, the pre-stored preset spacing corresponding to the identified landing position may be determined as the spacing of the camera module relative to the object to be identified. Based on this, the control module 101 does not need to run the computing resources of the ranging algorithm, which can reduce the preparation cost of the camera module and can be better applied to various small and low-cost code reading devices.

[0047] Alternatively, the laser ranging module can also realize laser ranging by pulse mode or phase mode. The pulse mode refers to laser ranging by measuring the time required for the emitted laser pulse to go back and forth between the camera module and the object to be identified. The phase mode refers to laser ranging by measuring the phase difference generated by the continuously emitted modulated laser signal after going back and forth between the camera module and the object to be identified.

[0048] Furthermore, in the case where the ranging module 102 is a laser ranging module, the ranging laser emitted by the laser light of the ranging module 102 can be a visible laser. That is, the ranging module 102 can measure the distance between the object to be identified and the camera module through the visible laser. Furthermore, the visible laser emitted by the laser light of the ranging module 102 can form a visible laser point, so that the staff can calibrate the lens direction of the camera module with reference to the visible laser point formed by the illumination of the ranging module 102, so that the camera module is aimed at the object to be identified. In this way, the ranging module 102 provided in the embodiment of the present application, in addition to having a ranging function, can also realize a aiming function through a visible laser point, and can support the camera module to accurately and quickly collect image information of the object to be identified.

[0049] The control module 101 can determine the target camera module from at least two camera modules 103 according to the spacing of the object to be identified relative to the camera module. The target camera module is a camera module 103 used to collect image information of the object to be identified. Among them, the probability of the camera module 103 being determined as the target camera module is positively correlated with the matching degree between the focal length and the spacing of the camera module 103. In other words, the higher the matching degree between the focal length and the spacing of the camera module 103, the greater the probability of being determined as the target camera module. In this way, the control module 101 can select a camera module 103 that can clearly image the object to be identified from at least two camera modules 103 according to the spacing of the object to be identified relative to the camera module, so as to support accurate identification of the object to be identified.

[0050] Optionally, the control module 101 may directly select the camera module 103 with the highest matching degree from the at least two camera modules 103 as the target camera module according to the matching degree between the focal lengths and the spacings of the at least two camera modules 103. Alternatively, the control module 101 may configure the probability of being selected for each of the at least two camera modules 103 according to the matching degree between the focal lengths and the spacings of the at least two camera modules 103. Furthermore, the control module 101 may select the camera module 103 with the highest probability of being selected from the at least two camera modules 103 as the target camera module.

[0051] Optionally, the control module 101 may determine the degree of matching between the focal length and the spacing of the camera module 103 based on the deviation between the focal length and the spacing of the camera module 103. In this case, the smaller the deviation between the focal length and the spacing of the camera module 103, the higher the degree of matching between the focal length and the spacing of the camera module 103.

[0052] Alternatively, the control module 101 may also determine the degree of matching between the focal length and the spacing of the camera module 103 based on the ratio of the focal length and the spacing of the camera module 103. In this case, the closer the ratio of the focal length and the spacing of the camera module 103 is to 1, the higher the degree of matching between the focal length and the spacing of the camera module 103.

[0053] Optionally, the control module 101 may be implemented using a micro controller unit (MCU), a system on chips (SOC) or other hardware, which is not limited in the present embodiment.

[0054] In a possible embodiment, Figure 2 , which is a schematic diagram of the structure of another camera module provided in an embodiment of the present application. The camera module may also include an image data link control module 104.

[0055] The control module 101 may be connected to each camera module 103 respectively through the image data link control module 104 .

[0056] The image data link control module 104 is used to receive the image information of the object to be identified collected by each camera module 103 .

[0057] The control module 101 is also used to send indication information for indicating the target camera module to the image data link control module 104. Specifically, after the control module 101 determines the target camera module from the at least two camera modules 103, it can send indication information for indicating the target camera module to the image data link control module 104. Correspondingly, the image data link control module 104 can receive the indication information for indicating the target camera module from the control module 101. Furthermore, the image data link control module 104 can filter the image information of the object to be identified collected by the target camera module from the image information of the object to be identified collected by the at least two camera modules 103, and send the image information collected by the target camera module to the control module 101.

[0058] In this way, the control module 101 can control the image data link control module 104 to switch the image information collected by at least two camera modules 103 according to the distance between the object to be identified and the camera module, so that the image data link control module 104 transmits the image information collected by the camera module 103 that can clearly image the object to be identified, thereby avoiding the problem that a single camera module may not be able to form a clear image, and effectively achieving that the same camera module has high recognition clarity at both short and long distances and has good compatibility, thereby ensuring the recognition accuracy of the object to be identified.

[0059] In a possible manner, the image data link control module 104 may be a mobile industry processor interface (MIPI) switch module.

[0060] In a possible embodiment, Figure 3 , which is a schematic diagram of the structure of another camera module provided in an embodiment of the present application. The camera module may further include a fill light module 105.

[0061] Optionally, the fill light module 105 may be a light-emitting diode (LED) lamp, or a high intensity discharge lamp (HID) lamp, etc.

[0062] The control module 101 may also be used to control the fill light module 105 to perform fill light when the target camera module is shooting, so as to avoid the problem that the target camera module cannot form a clear image in a dark environment.

[0063] In a possible embodiment, the camera module 103 may include an image sensor, an auto-focus lens, and a focus module.

[0064] An image sensor is a device that converts an optical image into an electrical signal, such as a charge coupled device (CCD) image sensor. An autofocus lens is the above-mentioned adjustable optical lens based on TFP-MEMS.

[0065] The control module 101 may pre-store a plurality of preset imaging focal lengths corresponding to each camera module 103 in at least two camera modules 103. Different preset imaging focal lengths correspond to different preset spacing intervals. Based on this, after determining the spacing of the object to be identified relative to the camera module, the control module 101 may determine the preset imaging focal length corresponding to the preset spacing interval including the spacing as the target imaging focal length from the plurality of preset imaging focal lengths corresponding to the target camera module, and control the focusing module in the target camera module to adjust the focal length of the automatic focusing lens in the target camera module to the target imaging focal length, so as to improve the clarity of the image information collected by the target camera module.

[0066] Or further, after the focal length of the automatic focusing lens in the target camera module is adjusted to the target imaging focal length, if the clarity of the image information collected by the target camera module is low, then the recognition result of the object to be identified cannot be obtained based on the image information collected by the target camera module. In other words, if the clarity of the image information collected by the target camera module is still lower than the preset clarity, it cannot support the recognition of information such as the image identification code in the image information. The control module can also control the focusing module in the target camera module to adjust the target imaging focal length according to the clarity of the image information of the object to be identified collected by the target camera module, so as to achieve fine-tuning of the focusing module in the target camera module to improve the clarity of the image information collected by the target camera module.

[0067] Specifically, the control module 101 can send adjustment parameters to the focus module of the target camera module. Based on the adjustment parameters sent by the control module 101, the focus module can apply a voltage of corresponding magnitude to the film pressing plate on the automatic focus lens in the target camera module, thereby adjusting the focal length of the automatic focus lens in the target camera module. It should be understood that in the process of adjusting the focal length of the automatic focus lens in the target camera module to the target imaging focal length, the adjustment parameter can be larger. In the process of controlling the focus module in the target camera module to adjust the target imaging focal length, the adjustment parameter can be smaller. In this way, the control module 101 can accurately adjust the focal length of the target camera module, so that the target camera module can collect clearer image information, supporting accurate recognition of the object to be identified.

[0068] In a possible embodiment, the at least two camera modules 103 may include a long-focus module and a short-focus module.

[0069] Among them, the focal length of the telephoto module is greater than the focal length of the short-focus module. In this case, if the distance between the object to be identified and the camera module is greater than or equal to the preset distance, the control module 101 can determine the target camera module from the telephoto module. Alternatively, if the distance between the object to be identified and the camera module is less than the preset distance, the control module 101 can determine the target camera module from the short-focus module. The preset distance can be flexibly set based on the focal lengths of the telephoto module and the short-focus module, and there is no limitation on this.

[0070] Considering that the camera module is used to support the identification of the identification code set on the object to be identified, and the identification code set on the object to be identified can be a barcode such as Code39 or Code128, a QR code such as a quick response code or a data matrix code, or other identification codes. In order to achieve clear imaging of the object to be identified, the focal length of the telephoto module can be greater than or equal to 50 cm and less than or equal to 1500 cm, that is, the range can be 50 cm to 1500 cm, such as 50 cm, 500 cm, 1400 cm and 1500 cm. The focal length range of the short-focus module can be greater than or equal to 1.5 cm and less than 50 cm, such as 1.5 cm, 40 cm and 49 cm.

[0071] In this case, the preset spacing may be 50 cm. For example, when the distance between the object to be identified and the camera module is 1.5 cm, the control module 101 may determine that the spacing is less than the preset spacing, and determine the target camera module from the short-focus module. For another example, when the distance between the object to be identified and the camera module is 50 cm, the control module 101 may determine that the spacing is greater than or equal to the preset spacing, and determine the target camera module from the telephoto module. For another example, when the distance between the object to be identified and the camera module is 1400 cm, the control module 101 may determine that the spacing is greater than or equal to the preset spacing, and determine the target camera module from the telephoto module.

[0072] Optionally, the number of the long-focus modules may be one or more, and the number of the short-focus modules may be one or more.

[0073] When the number of telephoto modules is one, if the distance between the object to be identified and the camera module is greater than or equal to the preset distance, the control module 101 can directly determine the one telephoto module as the target camera module.

[0074] In the case where there are multiple telephoto modules, if the distance between the object to be identified and the camera module is greater than or equal to the preset distance, the control module 101 can determine the target camera module from the multiple telephoto modules based on the matching degree between the focal lengths of the multiple telephoto modules and the distance between the object to be identified and the camera module. It should be understood that the implementation of this process can refer to the specific description of the control module 101 determining the target camera module from at least two camera modules 103 according to the distance between the object to be identified and the camera module, which will not be repeated here.

[0075] It should be understood that the implementation manner of the control module 101 determining the target camera module from the short-focus module can refer to the specific description of the control module 101 determining the target camera module from the long-focus module, which will not be repeated here.

[0076] Thus, for objects to be identified within a short distance, the control module 101 can control the image data link control module 104 to transmit the image information collected by the short-focus module. For objects to be identified within a long distance, the control module 101 can control the image data link control module 104 to transmit the image information collected by the long-focus module.

[0077] In a possible embodiment, Figure 4 , which is a schematic diagram of the structure of another camera module provided in an embodiment of the present application. In the case where at least two camera modules 103 are two camera modules, Figure 4 As shown, the camera module provided in the embodiment of the present application may include a control module 101, a ranging module 102, a telephoto module 103a, a short-focus module 103b, an image data link control module 104 and a fill light module 105. Among them, the telephoto module 103a may include an image sensor, a focusing module and a telephoto lens. The telephoto lens may be an adjustable optical lens based on TFP-MEMS, and the focal length may be greater than or equal to 50 cm and less than or equal to 1500 cm. The short-focus module 103b may include an image sensor, a focusing module and a short-focus lens. The short-focus lens may be an adjustable optical lens based on TFP-MEMS, and the focal length may be greater than or equal to 1.5 cm and less than 50 cm.

[0078] Thus, in the camera module provided by the embodiment of the present application, the control module 101 can select a matching camera module from the telephoto module 103a and the short-focus module 103b based on the distance between the object to be identified and the camera module collected by the ranging module 102. If the telephoto module 103a is selected, the control module 101 can send adjustment parameters to the focus module in the telephoto module 103a through the image data link control module 104, and obtain the image data collected by the telephoto module 103a. If the short-focus module 103b is selected, the control module 101 can send adjustment parameters to the focus module in the short-focus module 103b through the image data link control module 104, and obtain the image data collected by the short-focus module 103b. Therefore, the camera module can clearly image the object to be identified in a close range or a long range, which can avoid the problem that a single camera module may not be able to clearly image, and has good compatibility, thereby supporting accurate identification of the object to be identified.

[0079] Optionally, the camera module can be applied to a code reading device. The embodiments of the present application do not impose any restrictions on the specific form of the code reading device. For example, the code reading device can be a gun, an industrial-grade personal digital assistant (PDA) device, an industrial camera, a smart camera, a handheld code reading device for express barcode recognition, and a fixed code reading device. Industrial-grade PDA devices are mainly used in the industrial field, such as barcode scanners, radio frequency identification (RFID) readers, and point of sale (POS) terminals.

[0080] In terms of hardware implementation, the above-mentioned code reading device can be implemented as follows: Figure 5 The code reading device 20 shown is implemented. Figure 5 , which is a schematic diagram of the structure of a code reading device 20 provided in an embodiment of the present application. The code reading device 20 can be used to implement the functions of the above-mentioned code reading device.

[0081] Figure 5 The camera module 201 shown is the camera module provided in the above embodiment, and may have the following Figures 1 to 4 The structure shown in any of the accompanying drawings.

[0082] Figure 5 The code reading device 20 shown may include: a processor 202 , a memory 203 , a communication interface 204 , and a bus 205 . The processor 202 , the memory 203 , and the communication interface 204 may be connected via the bus 205 .

[0083] The processor 202 is the control center of the code reading device 20, and can be a general-purpose central processing unit (CPU) or other general-purpose processors, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0084] As an example, the processor 202 may include one or more CPUs, such as Figure 5 CPU 0 and CPU 1 are shown in .

[0085] The memory 203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0086] In a possible implementation, the memory 203 may exist independently of the processor 202. The memory 203 may be connected to the processor 202 via a bus 205 and is used to store data, instructions, or program codes. When the processor 202 calls and executes the instructions or program codes stored in the memory 203, the recognition of the object to be recognized can be realized.

[0087] In another possible implementation, the memory 203 may also be integrated with the processor 202 .

[0088] The communication interface 204 is used for connecting the code reading device 20 with other devices via a communication network, which may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 204 may include a receiving unit for receiving data and a sending unit for sending data.

[0089] The bus 205 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0090] It should be pointed out that Figure 5 The structure shown in the figure does not constitute a limitation on the code reading device 20. Figure 5 In addition to the components shown, the code reading device 20 may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0091] For ease of understanding, the camera method provided by the present application is described in detail below with reference to the accompanying drawings.

[0092] like Figure 6 The figure is a flow chart of a camera method provided by the present application. Figure 6 The imaging method shown can be applied to the above Figures 1 to 5 The camera module shown in any of the accompanying drawings, the method includes: S301-S303.

[0093] S301: Obtain the distance between the object to be identified and the camera module.

[0094] S302: Determine a target camera module from at least two camera modules according to the distance.

[0095] The probability that a camera module is determined as a target camera module is positively correlated with the matching degree between the focal length and the spacing of the camera module.

[0096] S303: Control the target camera module to capture image information of the object to be identified.

[0097] Based on this method, the user can perform an identification operation on the code reading device (such as clicking an identification button). In response to the identification operation performed by the user, the code reading device can instruct the camera module to collect images. In this case, before collecting image information of the object to be identified, the camera module can control the distance measurement module to obtain the distance between the object to be identified and the camera module, so as to further determine the target camera module from at least two camera modules, thereby collecting image information of the object to be identified with higher clarity, so that the code reading device can accurately identify the object to be identified.

[0098] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the method. It is understandable that in order to realize the above functions, the computer device includes at least one of the hardware structure and software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0099] The embodiment of the present application can divide the computer device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0100] For example, Figure 7 A schematic diagram of the structure of a camera device is shown. The camera device 30 can be applied to a camera module, and the camera module includes at least two camera modules with different focal lengths. The camera device 30 is used to execute the camera method involved in the above embodiment. The camera device 30 includes: an acquisition unit 401, a processing unit 402 and a control unit 403.

[0101] The acquisition unit 401 is used to acquire the distance between the object to be identified and the camera module.

[0102] The processing unit 402 is configured to determine a target camera module from at least two camera modules according to the distance. The probability of a camera module being determined as the target camera module is positively correlated with the matching degree between the focal length and the distance of the camera module.

[0103] The control unit 403 is used to control the target camera module to capture image information of the object to be identified.

[0104] For the specific description of the above optional manner, please refer to the above method embodiment, which will not be repeated here. In addition, the explanation of any of the above computer devices and the description of the beneficial effects can refer to the above corresponding method embodiment, which will not be repeated here.

[0105] An embodiment of the present application also provides a readable storage medium, on which a computer program is stored. When the computer program runs on a camera module, the camera module executes any of the methods executed by the camera modules provided above.

[0106] For the explanation of the relevant contents and description of the beneficial effects of any of the readable storage media provided above, reference may be made to the corresponding embodiments above, which will not be repeated here.

[0107] The embodiment of the present application also provides a computer program product including instructions, when the instructions are run on the camera module, the camera module executes any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the camera module, the process or function according to the embodiment of the present application is generated in whole or in part. The camera module can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a readable storage medium, or transmitted from one readable storage medium to another readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The readable storage medium can be any available medium that the camera module can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with the medium. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), etc.

[0108] It should be noted that the above-mentioned devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as but not limited to the above-mentioned memories, readable storage media, etc., are all non-transitory.

[0109] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the camera module, the process or function according to the embodiment of the present application is generated in whole or in part. The camera module can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a readable storage medium, or transmitted from one readable storage medium to another readable storage medium. For example, computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The readable storage medium can be any available medium that the camera module can access or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with the medium. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), etc.

[0110] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0111] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A camera module, characterized in that: include: A control module, a distance measurement module, and at least two camera modules with different focal lengths; The control module is respectively connected to the distance measurement module and each of the camera modules; The distance measuring module is used to measure the distance between the object to be identified and the camera module; The control module is used to determine a target camera module from the at least two camera modules according to the distance, and control the target camera module to collect image information of the object to be identified; the probability that the camera module is determined to be the target camera module is positively correlated with the degree of matching between the focal length of the camera module and the distance.

2. The camera module according to claim 1, characterized in that: The camera module includes an image sensor, an automatic focusing lens and a focusing module; The control module is also used to determine, from among a plurality of preset imaging focal lengths corresponding to the target camera module, a preset imaging focal length corresponding to a preset spacing interval including the spacing as the target imaging focal length, and control a focusing module in the target camera module to adjust the focal length of an automatic focusing lens in the target camera module to the target imaging focal length, so as to improve the clarity of image information captured by the target camera module; different preset imaging focal lengths correspond to different preset spacing intervals.

3. The camera module according to claim 2, characterized in that: The control module is also used to control the focus module in the target camera module to adjust the target imaging focal length according to the clarity of the image information of the object to be identified collected by the target camera module, so as to improve the clarity of the image information collected by the target camera module.

4. The camera module according to claim 1, characterized in that: The at least two camera modules include a telephoto module and a short-focus module; the focal length of the telephoto module is greater than the focal length of the short-focus module; if the distance is greater than or equal to a preset distance, the target camera module is determined from the telephoto module, or, if the distance is less than the preset distance, the target camera module is determined from the short-focus module; wherein the focal length of the telephoto module is greater than or equal to 50 cm and less than or equal to 1500 cm; the focal length of the short-focus module is greater than or equal to 1.5 cm and less than 50 cm.

5. The camera module according to claim 1, characterized in that: The camera module also includes: an image data link control module; The control module is connected to each of the camera modules respectively through the image data link control module; The control module is also used to send instruction information for instructing the target camera module to the image data link control module; The image data link control module is used to receive the image information collected by each of the camera modules, and send the image information collected by the target camera module to the control module.

6. The camera module according to claim 1, characterized in that: The distance measurement module is specifically used to emit distance measurement laser; The camera module is used to collect the ranging image information of the object to be identified; the ranging image information includes the landing point information of the ranging laser on the surface of the object to be identified; The control module is further used to determine the distance according to the landing point information in the ranging image information.

7. The camera module according to claim 6, characterized in that: The distance measuring laser is a visible laser, and the visible laser point formed by the distance measuring module is used to calibrate the lens direction of the camera module.

8. The camera module according to claim 1, characterized in that: The camera module also includes: a fill light module; The control module is also used to control the fill light module to perform fill light when the target camera module is shooting.

9. A camera method, characterized in that: Applied to a camera module, the camera module includes at least two camera modules with different focal lengths; the method includes: Obtaining the distance between the object to be identified and the camera module; Determine a target camera module from the at least two camera modules according to the distance; the probability that the camera module is determined as the target camera module is positively correlated with the degree of matching between the focal length of the camera module and the distance; The target camera module is controlled to capture image information of the object to be identified.

10. A camera device, characterized in that: Applied to a camera module, the camera module includes at least two camera modules with different focal lengths; the device includes: an acquisition unit, a processing unit and a control unit; The acquisition unit is used to acquire the distance between the object to be identified and the camera module; The processing unit is used to determine a target camera module from the at least two camera modules according to the distance; the probability that the camera module is determined to be the target camera module is positively correlated with the matching degree between the focal length of the camera module and the distance; The control unit is used to control the target camera module to capture image information of the object to be identified.

11. A code reading device, characterized in that: include: A processor, and a camera module as claimed in any one of claims 1 to 8; The processor is connected to a memory, the memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory to identify an identification code in the image information captured by the camera module.

12. A readable storage medium, characterized in that: Used to store computer instructions, when the computer instructions are executed on a code reading device, the code reading device executes the method as claimed in claim 9.

Citation Information

Patent Citations

  • Shooting control method and device, computer readable medium and electronic equipment

    CN111757005A

  • Imaging apparatus and imaging method

    CN116982320A

  • Camera focusing method and device, electronic equipment and computer readable storage medium

    CN117294938A

  • Image recognition device

    CN203482300U

  • Processing method, terminal device and storage medium

    WO2022266907A1