Program loading method and device, camera, image processing system and storage medium
By automatically loading the image processing program by acquiring the light source's operating status signal, the problem of manually setting the light source type switching in the prior art is solved, realizing efficient light source switching and image processing program loading, and reducing circuit complexity and cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HIKROBOT TECH CO LTD
- Filing Date
- 2022-12-08
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, users need to manually set the camera to load image processing programs when changing the camera's light source type, which results in cumbersome operation, low efficiency, and high labor costs.
By acquiring the working status signals of multiple different types of light sources, the system automatically determines the light source currently in operation and loads the corresponding image processing program.
It simplifies user operations, improves business efficiency, reduces labor costs, and decreases the complexity and cost of circuit structures.
Smart Images

Figure CN115883960B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision technology, and in particular to a program loading method, apparatus, camera, image processing system and storage medium. Background Technology
[0002] With the rapid development of machine vision technology, cameras can capture images and process them, for example, to identify information contained within the images. Furthermore, different types of light sources may be needed for the camera depending on the information being captured. For example, when capturing images containing barcodes, a white light source is required, and the camera can be loaded with an image processing program for processing barcode-containing images. Conversely, when capturing images containing circuitry on a circuit board, a red light source is needed, and the camera can be loaded with an image processing program for processing circuitry-containing images.
[0003] In related technologies, when users change the type of light source according to business needs, they need to manually set the camera so that the camera loads and runs the corresponding program for processing the acquired images. This leads to cumbersome user operations, low business efficiency, and high labor costs. Summary of the Invention
[0004] The purpose of this application is to provide a program loading method, apparatus, camera, image processing system, and storage medium to simplify user operations, improve business efficiency, and reduce labor costs. The specific technical solution is as follows:
[0005] A first aspect of this application provides a program loading method, the method comprising:
[0006] Acquire status signals representing the working status of multiple different types of light sources;
[0007] Based on the status signal, determine the light source that is currently in operation among the plurality of different types of light sources;
[0008] Load the image processing program corresponding to the currently active light source.
[0009] In some embodiments, the status signal represents the voltage drop across the light source currently in operation among the plurality of different types of light sources;
[0010] The step of determining the light source currently in operation among the plurality of different types of light sources based on the status signal includes:
[0011] From the multiple different types of light sources, the light source whose voltage drop across its terminals when in operation matches the voltage drop represented by the state signal is selected as the light source currently in operation.
[0012] In some embodiments, each type of light source includes a specified number of LEDs; the voltage drop across the light source of that type when it is in operation is determined based on the voltage drop when one LED in the light source of that type is in operation and the connection method of the specified number of LEDs included in the light source of that type.
[0013] In some embodiments, the method further includes:
[0014] If the voltage drop across the terminals of the multiple different types of light sources is inconsistent with the voltage drop represented by the status signal when they are in operation, an alarm will be triggered.
[0015] A second aspect of this application provides a program loading apparatus, the apparatus comprising:
[0016] The status signal acquisition module is used to acquire status signals that represent the working status of multiple different types of light sources;
[0017] A light source type determination module is used to determine, based on the status signal, the light source currently in operation among the plurality of different types of light sources;
[0018] The program loading module is used to load the image processing program corresponding to the light source that is currently in operation.
[0019] In some embodiments, the status signal represents the voltage drop across the light source currently in operation among the plurality of different types of light sources;
[0020] The light source type determination module is specifically used for:
[0021] From the multiple different types of light sources, the light source whose voltage drop across its terminals when in operation matches the voltage drop represented by the state signal is selected as the light source currently in operation.
[0022] In some embodiments, each type of light source includes a specified number of LEDs; the voltage drop across the light source of that type when it is in operation is determined based on the voltage drop when one LED in the light source of that type is in operation and the connection method of the specified number of LEDs included in the light source of that type.
[0023] In some embodiments, the apparatus further includes:
[0024] An alarm module is used to issue an alarm if the voltage drop across the terminals of the multiple different types of light sources is inconsistent with the voltage drop represented by the status signal when they are in operation.
[0025] A third aspect of this application provides a camera, including a processor and a camera module;
[0026] The camera is used to capture images;
[0027] The processor is configured to execute any of the program loading methods described above to process the images captured by the camera.
[0028] A fourth aspect of this application provides an image processing system, the image processing system including a camera as described in the third aspect of this application, and a plurality of different types of light sources.
[0029] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the program loading methods described above.
[0030] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the program loading methods described above.
[0031] Beneficial effects of the embodiments in this application:
[0032] This application provides a program loading method, which includes: acquiring a status signal representing the working state of multiple different types of light sources; determining the light source currently in working state among the multiple different types of light sources based on the status signal; and loading the image processing program corresponding to the light source currently in working state.
[0033] Based on the above processing, the type of light source currently in operation can be determined from the status signals representing the operating states of multiple different types of light sources. Then, the corresponding image processing program is automatically loaded based on the determined operating light source. This allows the camera to automatically load the image processing program corresponding to the new light source type when the user changes it according to business needs. Consequently, it simplifies user operations, improves business efficiency, and reduces labor costs.
[0034] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0036] Figure 1 A flowchart illustrating a program loading method provided in an embodiment of this application;
[0037] Figure 2 A flowchart illustrating the loading process of an image processing system provided in this application embodiment;
[0038] Figure 3 This is a schematic diagram of a program loading device provided in an embodiment of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0040] With the rapid development of machine vision technology, images can be acquired via cameras and processed, such as identifying information contained within the images. Furthermore, since the types of information acquired vary, different types of light sources are needed for the cameras. For example, in logistics scenarios, a camera can be placed near a conveyor belt to capture images of objects transported on the belt. Additionally, different types of light sources can be used, each with its illumination direction aligned with the direction the camera is capturing images, thus providing supplementary lighting for the camera.
[0041] In related technologies, when users change the type of light source according to business needs, they need to manually set the camera so that the camera loads and runs the corresponding image processing program. This makes the operation cumbersome for users, resulting in low business efficiency and high labor costs.
[0042] To address the aforementioned problems, embodiments of this application provide a program loading method. This method can be applied to an electronic device, which may be a processor. For example, the electronic device may be a processor in a camera. Figure 1 As shown, Figure 1 This application provides a flowchart illustrating a program loading method, which may include the following steps:
[0043] S101: Obtain status signals representing the working status of multiple different types of light sources.
[0044] S102: Based on the status signal, determine the light source that is currently in operation among multiple different types of light sources.
[0045] S103: Load the image processing program corresponding to the light source that is currently in operation.
[0046] Based on the above processing, the type of light source currently in operation can be determined from the status signals representing the operating states of multiple different types of light sources. Then, the corresponding image processing program is automatically loaded based on the determined operating light source. This allows the camera to automatically load the image processing program corresponding to the new light source type when the user changes it according to business needs. Consequently, it simplifies user operations, improves business efficiency, and reduces labor costs.
[0047] In this embodiment, a single hardware device, referred to as a lamp board, can provide multiple different types of light sources. The lamp board can be connected to an electronic device via hardware circuitry. In other words, multiple different types of light sources can be set on a single lamp board. Alternatively, multiple lamp boards can be set, each containing one type of light source. In this case, the electronic device can be connected to each lamp board via hardware circuitry.
[0048] Regarding step S101, the electronic device can acquire status signals representing the operating states of multiple different types of light sources through hardware circuitry between itself and the lamp board. For example, the types of light sources may include: red light, white light, blue light, and infrared light, etc.
[0049] For any type of light source, it can be in an active state, meaning that the circuit of that type of light source is currently connected; or it can be in an inactive state, meaning that the circuit of that type of light source is currently not connected. It is understood that at any given time, at most only one of the multiple different types of light sources can be in an active state.
[0050] Regarding step S102, since the status signal can represent the working state of multiple different types of light sources, the electronic device can determine the light source that is currently in working state based on the status signal.
[0051] The status signal in this application can take many forms, and correspondingly, the electronic device can determine the light source currently in operation based on the status signal in different ways.
[0052] In one implementation, the status signal represents the voltage drop across the light source currently in operation among multiple different types of light sources. Accordingly, step S102 includes: determining, from among the multiple different types of light sources, the light source whose voltage drop across its terminals when in operation matches the voltage drop represented by the status signal, as the light source currently in operation.
[0053] For example, an electronic device may be equipped with an ADC (Analog-to-Digital Converter) sampling module, which can be connected to both ends of each light source. Thus, through the ADC sampling module, the voltage drop across the light source currently in operation can be acquired.
[0054] Electronic devices can pre-obtain the voltage drop across each light source when it is in operation (which can be called the operating voltage drop). Then, when a state signal representing the voltage drop across the light source currently in operation is obtained, the light source whose operating voltage drop matches the state signal can be determined from multiple different types of light sources. That is, the light source currently in operation.
[0055] In practical applications, a constant current drive circuit typically provides a fixed current (referred to as the operating current) to the light source, enabling it to enter its operating state. Under this operating current, different types of light sources experience different voltage drops when in operation. Therefore, electronic devices can pre-determine the voltage drop across each type of light source under this operating current, and then, upon receiving the status signal, compare these values to determine which light source is currently operating.
[0056] In related technologies, additional detection circuits can be added to the lamp board, such as a detection circuit containing resistance or an NFC (Near Field Communication) circuit, to detect the light source currently in operation. This increases the cost of the lamp board. Correspondingly, additional hardware circuitry is needed between this detection circuit and the electronic device, and relevant parameters in the electronic device need to be set for the detection circuit, increasing the complexity and cost of the entire circuit structure.
[0057] Based on the method provided in this application embodiment, the voltage drop across the light source currently in operation among multiple different types of light sources can be directly obtained through electronic devices without adding the aforementioned detection circuit. This reduces the cost of the lamp board and the overall circuit structure, decreases the uncertainty of on-site construction, and reduces the complexity of setting relevant parameters of the electronic devices.
[0058] In another implementation, the status signal indicates the type of light source currently in operation among multiple different types of light sources. For example, in this case, the status signal can be a level signal.
[0059] For example, a circuit can be configured that includes a data selector (MUX, multiplexer) connected to different types of light sources and capable of outputting a level signal indicating the type of light source currently in operation among multiple different types of light sources. Correspondingly, the electronic device can record the correspondence between each level signal and the type of light source.
[0060] For example, several different types of light sources include: red light sources, white light sources, blue light sources, and infrared light sources. Correspondingly, the data selector can output two level signals, O1 and O2. The electronic device can determine the light source currently in operation based on the above correspondence and the current level signals O1 and O2.
[0061] When the red light source is in operation and other types of light sources are not in operation, both level signals O1 and O2 are low. Therefore, based on this correspondence and the current level signals O1 and O2, the electronic device can determine that the currently operating light source is the red light source.
[0062] When the white light source is in operation and other types of light sources are not in operation, the level signal O1 is high and the level signal O2 is low. Therefore, based on the above correspondence and the current level signals O1 and O2, the electronic device can determine that the light source currently in operation is the white light source.
[0063] When the blue light source is in operation and other types of light sources are not in operation, the level signal O1 is low and the level signal O2 is high. Therefore, based on this correspondence and the current level signals O1 and O2, the electronic device can determine that the currently operating light source is the blue light source.
[0064] When the infrared light source is in operation and other types of light sources are not in operation, both level signals O1 and O2 are high. Therefore, based on this correspondence and the current level signals O1 and O2, the electronic device can determine that the currently operating light source is an infrared light source.
[0065] Regarding step S103, for any one of multiple different types of light sources, the light source is matched with a user's business requirement. The electronic device can pre-cache the image processing program required to complete each business requirement, and after determining the light source currently in operation, load the image processing program used to complete the business requirement corresponding to that light source.
[0066] For example, if the light source currently in operation is determined to be a white light source, it means that the electronic device currently needs to process the image corresponding to the white light source. For example, it could be an image containing a barcode, and the electronic device loads an image processing program to process the image containing the barcode. If the light source currently in operation is determined to be a red light source, it means that the electronic device currently needs to process the image corresponding to the red light source. For example, it could be an image containing circuits on a circuit board, and the electronic device loads an image processing program to process the image containing circuits on a circuit board.
[0067] In some embodiments, each type of light source includes a specified number of LEDs; the voltage drop across the light source of that type when it is in operation is determined based on the voltage drop when one LED in the light source of that type is in operation and the connection method of the specified number of LEDs included in the light source of that type.
[0068] The lamp beads can be LED (Light Emitting Diode) lamp beads. The connection method for the specified number of lamp beads includes series and parallel connection. The number of lamp beads contained in different types of light sources can be the same or different.
[0069] In practical applications, a constant current drive circuit typically provides a fixed current (referred to as the operating current) to the light source, enabling it to operate. Under this operating current, the voltage drop (referred to as the first voltage drop), Vf (Forward Voltage), varies depending on the type of light source and its LED chips. For example, with an operating current of 1A, the voltage drop of the LED chips in a red light source is 2.5V, in an infrared light source it is 1.75V, in a white light source it is 3.0V, and in a blue light source it is 3.25V.
[0070] For example, after acquiring the voltage drop represented by the status signal, the electronic device can calculate the voltage drop (which can be called the actual voltage drop) of each LED in the light source that is in operation, based on a specified number and the connection method of a specified number of LEDs in each type of light source. Then, it can determine the LED with the corresponding first voltage drop as the LED with the actual voltage drop, and the light source to which the LED belongs is the light source that is currently in operation.
[0071] For example, for each type of light source, the voltage drop across the light source when it is in operation can be calculated based on the first voltage drop of a single LED in that type of light source and the connection method of a specified number of LEDs in that type of light source. Furthermore, after obtaining the voltage drop represented by the status signal, the light source whose voltage drop across it is consistent with the voltage drop represented by the status signal when it is in operation can be identified as the light source currently in operation.
[0072] Based on the above processing, the voltage drop across the light source currently in operation among multiple different types of light sources can be directly obtained through electronic devices without the need to add the aforementioned detection circuit. This reduces the cost of the lamp board and the overall circuit structure, decreases the uncertainty of on-site construction, and reduces the complexity of setting relevant parameters of the electronic devices.
[0073] In some embodiments, the method further includes: issuing an alarm if the voltage drop across multiple different types of light sources when they are in operation is inconsistent with the voltage drop represented by the status signal.
[0074] If the voltage drop across multiple different types of light sources is inconsistent with the voltage drop indicated by the status signal when they are in operation, for example, if the voltage drop indicated by the status signal is 0 or too low, it indicates that there is a short circuit or open circuit in the light source currently in operation. Therefore, the electronic device can issue an alarm to notify the user to inspect or replace the light source.
[0075] Based on the above processing, the voltage drop on both sides of the light panel is detected, and an alarm is triggered when any type of light source in the light panel malfunctions, enabling users to perform maintenance in a timely manner and improving the stability of business processing.
[0076] See Figure 2 , Figure 2 This is a flowchart illustrating an image processing system loader provided in an embodiment of this application, as shown below. Figure 2 As shown, Figure 2 The process includes the following steps:
[0077] S201: The device is powered on.
[0078] S202: The processor can obtain the voltage on both sides of the LED board through ADC sampling and determine whether the voltage is within the normal range. If not, proceed to step S203; if yes, proceed to step S205.
[0079] The processor, as used in this application, is the electronic device, for example, a processor in a camera. Specifically, it acquires status signals representing the operating states of multiple different types of light sources, where each status signal represents the voltage drop across the currently operating light source. The LED light panel is the light panel corresponding to each type of light source.
[0080] S203: LED light panel malfunction.
[0081] If the voltage is not within the normal range, for example, if the voltage value is 0 or too low, it indicates that the LED light panel is malfunctioning.
[0082] S204: The device cannot start normally; the feedback light board is malfunctioning.
[0083] That is, electronic devices can issue alarms.
[0084] S205: Determine the LED type through internal calculations and comparisons.
[0085] That is, electronic devices can determine the current working state of a light source based on status signals.
[0086] S206: Confirm the current device model.
[0087] That is, the electronic device confirms the image processing program corresponding to the light source that is currently in operation.
[0088] S207: Run the complete program for the corresponding model.
[0089] That is, load the image processing program corresponding to the light source that is currently in operation.
[0090] This application also provides a camera, including a processor and a camera lens;
[0091] The camera is used to capture images;
[0092] The processor is used to execute any of the program loading methods in the above embodiments to process the images captured by the camera.
[0093] This application also provides an image processing system, which includes a camera as described in the above embodiments and multiple different types of light sources.
[0094] This image processing system can be applied to various scenarios. For example, in logistics scenarios, a camera can be placed near a conveyor belt to capture images of objects transported on the conveyor belt. Multiple different types of light sources can be provided for the camera, with each light source illuminating the camera in the same direction as the image being captured, thus providing supplementary lighting for the camera.
[0095] Based on the same inventive concept, embodiments of this application also provide a program loading device. See also Figure 3 , Figure 3 This is a schematic diagram of a program loading device provided in an embodiment of this application. The device includes:
[0096] The status signal acquisition module 301 is used to acquire status signals that represent the working status of multiple different types of light sources;
[0097] The light source type determination module 302 is used to determine, based on the status signal, the light source currently in operation among the plurality of different types of light sources;
[0098] The program loading module 303 is used to load the image processing program corresponding to the light source that is currently in operation.
[0099] In some embodiments, the status signal represents the voltage drop across the light source currently in operation among the plurality of different types of light sources;
[0100] The light source type determination module 302 is specifically used for:
[0101] From the multiple different types of light sources, the light source whose voltage drop across its terminals when in operation matches the voltage drop represented by the state signal is selected as the light source currently in operation.
[0102] In some embodiments, each type of light source includes a specified number of LEDs; the voltage drop across the light source of that type when it is in operation is determined based on the voltage drop when one LED in the light source of that type is in operation and the connection method of the specified number of LEDs included in the light source of that type.
[0103] In some embodiments, the apparatus further includes:
[0104] An alarm module is used to issue an alarm if the voltage drop across the terminals of the multiple different types of light sources is inconsistent with the voltage drop represented by the status signal when they are in operation.
[0105] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described program loading methods.
[0106] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the program loading methods described above.
[0107] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a storage medium (e.g., solid state disk (SSD)).
[0108] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0109] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of devices, cameras, systems, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0110] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A program loading method, characterized in that, The method is applied to an electronic device equipped with an ADC digital-to-analog conversion sampling module. The electronic device is connected to multiple different types of light sources through hardware circuits. The ADC sampling module is used to collect the voltage drop across the light source currently in operation. The electronic device pre-caches image processing programs required for each business requirement to identify information contained in the image. The light source identified by each image processing program during image acquisition is consistent with the light source corresponding to that image processing program; the method includes: Acquire status signals representing the operating states of multiple different types of light sources; the status signals represent the voltage drop across the light source currently in operation among the multiple different types of light sources; From the plurality of different types of light sources, the light source whose voltage drop across its terminals when in working state is consistent with the voltage drop represented by the state signal is determined as the light source currently in working state; wherein, the voltage drop across its terminals is different for different types of light sources when in working state; Load the image processing program corresponding to the currently active light source.
2. The method according to claim 1, characterized in that, Each type of light source contains a specified number of LEDs; the voltage drop across the light source of this type when it is in operation is determined based on the voltage drop when one LED in the light source of this type is in operation, and the connection method of the specified number of LEDs contained in the light source of this type.
3. The method according to claim 1, characterized in that, The method further includes: If the voltage drop across the terminals of the multiple different types of light sources is inconsistent with the voltage drop represented by the status signal when they are in operation, an alarm will be triggered.
4. A program loading device, characterized in that, The device is applied to an electronic device equipped with an ADC digital-to-analog conversion sampling module. The electronic device is connected to multiple different types of light sources through hardware circuits. The ADC sampling module is used to collect the voltage drop across the light source currently in operation. The electronic device pre-caches the image processing programs required for each business requirement to identify the information contained in the image. The light source identified by each image processing program during image acquisition is consistent with the light source corresponding to that image processing program; the device includes: The status signal acquisition module is used to acquire status signals that represent the working status of multiple different types of light sources; A light source type determination module is used to determine, based on the status signal, the light source currently in operation among the plurality of different types of light sources; The program loading module is used to load the image processing program corresponding to the light source that is currently in operation; The status signal represents the voltage drop across the light source currently in operation among the plurality of different types of light sources; The light source type determination module is specifically used for: From the plurality of different types of light sources, the light source whose voltage drop across its terminals when in operation is consistent with the voltage drop represented by the state signal is determined as the light source currently in operation; wherein, the voltage drop across its terminals is different for different types of light sources when in operation.
5. The apparatus according to claim 4, characterized in that, Each type of light source contains a specified number of LEDs; the voltage drop across the light source of this type when it is in operation is determined based on the voltage drop when one LED in the light source of this type is in operation, and the connection method of the specified number of LEDs contained in the light source of this type.
6. The apparatus according to claim 4, characterized in that, The device further includes: An alarm module is used to issue an alarm if the voltage drop across the terminals of the multiple different types of light sources is inconsistent with the voltage drop represented by the status signal when they are in operation.
7. A camera, characterized in that, Including the processor and camera; The camera is used to capture images; The processor is configured to execute the method according to any one of claims 1-3 to process the images captured by the camera.
8. An image processing system, characterized in that, The image processing system includes the camera as described in claim 7, and multiple different types of light sources.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-3.
Citation Information
Patent Citations
Information processing method and electronic device
CN106028016A