CN114554091B - Quick image acquisition method for express mobile terminal - Google Patents

Quick image acquisition method for express mobile terminal Download PDF

Info

Publication number
CN114554091B
CN114554091B CN202210164822.8A CN202210164822A CN114554091B CN 114554091 B CN114554091 B CN 114554091B CN 202210164822 A CN202210164822 A CN 202210164822A CN 114554091 B CN114554091 B CN 114554091B
Authority
CN
China
Prior art keywords
camera
image
lamp
main board
original image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210164822.8A
Other languages
Chinese (zh)
Other versions
CN114554091A (en
Inventor
楼喜中
王元皓
郑清水
徐佳
张轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Boogoob Technology Co ltd
China Jiliang University
Original Assignee
Hangzhou Boogoob Technology Co ltd
China Jiliang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Boogoob Technology Co ltd, China Jiliang University filed Critical Hangzhou Boogoob Technology Co ltd
Priority to CN202210164822.8A priority Critical patent/CN114554091B/en
Publication of CN114554091A publication Critical patent/CN114554091A/en
Application granted granted Critical
Publication of CN114554091B publication Critical patent/CN114554091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0025Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement consisting of a wireless interrogation device in combination with a device for optically marking the record carrier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/75Circuitry for compensating brightness variation in the scene by influencing optical camera components

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The invention relates to the technical field of bar code scanning, and particularly discloses an image rapid acquisition method for an express mobile terminal.

Description

Quick image acquisition method for express mobile terminal
Technical Field
The invention relates to the technical field of bar code scanning, in particular to a rapid image acquisition method for an express mobile terminal.
Background
In the prior art, the express mobile terminal equipment integrates a scanning engine driving and decoding library, sends a control instruction through an I2C protocol to control the scanning engine to work, returns data information through mipi, and finally rapidly acquires bar code information through the terminal decoding library.
The scanning engine is a special device for identifying and processing bar code label information to classify and trade commodity goods. The scanning engine generally comprises a main board, a camera assembly, a light supplementing lamp and a sighting lamp to form a hardware module, and the main board provides a power supply interface, an I2C interface for accessing the express mobile terminal equipment and an MIPI interface.
At present, the scanning engine is widely applied to various industries, especially in the industries of express logistics, medical electronics and the like, in order to improve the speed of express logistics and accelerate the information acquisition of medical electronics, the scanning engine needs to read a large number of barcodes of various types such as one-dimensional codes, two-dimensional codes and the like, however, the red light emitted by aiming lamps of the scanning engine on the market easily affects the images on the barcodes, and when the scanning environment is excessive or too dark, the accuracy of acquiring commodity information by the scanning engine is low, the barcode reading speed is relatively slow, and the current social demand cannot be met.
Disclosure of Invention
The invention mainly aims to provide an image rapid acquisition method for an express mobile terminal, which can rapidly acquire clear bar code images, accurately acquire commodity information and meet social requirements.
In order to achieve the above purpose, the present invention provides a method for rapidly acquiring an image of an express mobile terminal, comprising the following steps:
s1, optimizing Camera sensor parameters, fixing frame rate and gain, skipping a platform ISP processing scheme, and obtaining an original image;
s2, the express mobile terminal acquires the ID of the scanning engine and acquires the imgbuffer memory address of the pass 1;
s3, the pass1 obtains an original image obtained by the Camera sensor, converts the original image into a RAW8 format, and sends the original image after format conversion into an image average brightness algorithm flow to realize quick exposure processing of the original image;
s4, acquiring an imgbuffer virtual memory address of the pass2, and writing the original image processed by the pass1 into the imgbuffer virtual memory of the pass 2;
s5, the original image in the Pass2 is returned to the application layer, and the application layer part of the scanning engine acquires the returned original image and sends the original image to the decoding library;
s6, outputting a decoding result by the decoding library, obtaining bar code information, calling a drive of the express mobile terminal to close a data stream of the scanning engine, and completing one-time quick scanning;
the pass1 is defined as a flow for acquiring an original image output by the Camera sensor;
the pass2 is defined as a process of performing 3A algorithm image processing on an original image output by the Camera sensor and converting the original image into identifiable image information;
the Camera sensor is defined as a Camera sensor;
the imgbuffer memory address is defined as the memory size of the original image obtained in the pass1 flow;
the imgbuffer virtual memory address is defined as the memory size of the acquired image in the pass2 flow;
the application layer is defined as a part of the Android frame which is interacted with a user;
the application layer portion of the scan engine is defined as a submodule of the Camera sensor in the application layer.
Preferably, in the step S1, the fixed frame rate means that the lighting time of the aiming lamp in the scanning engine is controlled within the frame interval of the picture of the scanning engine, the influence of the red light emitted by the aiming lamp on the image is removed, the control logic of the aiming lamp is implemented in a kernel and combined with the driver of the Camera sensor, wherein on hardware, the strobe pin of the Camera sensor is connected to the interrupt of the platform end, on software, the interrupt and the timer are combined, the aiming lamp is controlled by a common IO port, namely, the level change of the strobe pin of the Camera sensor is controlled within the frame interval of the Camera sensor, the interrupt of the platform end is used for responding to the change of the strobe pin, the aiming lamp is controlled in the interrupt program, the timer of the time within the frame interval is set, the aiming lamp is turned off, the lighting time of the aiming lamp in the scanning engine is controlled within the frame interval of the picture of the scanning engine, and the specific implementation steps are as follows:
s11, search query is carried out according to the Camera sensor in the sensor list;
s12, after the express mobile terminal is started, POWER ON;
s13, calling an OPEN function, reading the id of the Camera sensor, confirming whether I2C communication of the Camera sensor is normal, and initializing a member variable of the sensor_info;
s14, initializing a Camera sensor according to the configured Camera sensor initialization parameter;
s15, calling preview to prepare for preview;
s16, streaming on, and starting transmission of image data;
s17, controlling a strobe pin of the Camera sensor to change in level at each frame interval, and setting the timing time of a timer to be less than the time of one frame of image;
s18, calling an interrupt processing function of a timer, turning on the aiming lamp and the light supplementing lamp, and turning off the aiming lamp and keeping the light supplementing lamp on for a long time when the timer is up in one frame;
s19, if the timer is overtime or the code scanning is successful, the stream is turned off, and the light supplementing lamp is turned off;
the kernel is defined as a kernel layer in the Android architecture;
the timer is defined as a timer which is used for controlling elimination of red light emitted by the aiming lamp on software;
the platform end is defined as a main board end of the scanning engine;
the sensor list is defined as a camera sensor list provided by the MTK platform;
the search is defined as inquiring the Camera sensor model corresponding to the scanning engine;
the POWER ON is defined as scan engine POWER-ON;
the OPEN function is defined as a function of the scan engine on;
the sensor_info is defined as the parameter configuration of the scanning engine;
the Scanner init is defined as an initialization flow of the scanning engine;
the preview is defined as a preview flow of the scanning engine;
the Stream on is defined as the open Stream action of the scanning engine;
the stream off is defined as the off-stream action of the scan engine.
Preferably, the image average brightness algorithm in the step S3 is as follows:
(1) starting an image average brightness algorithm thread, acquiring an original image after format conversion, and extracting the brightness of the current original image;
(2) setting a brightness interval, judging and adjusting according to the brightness of the current pixel point in the brightness interval;
(3) converting the adjusted brightness value into a filter, and writing the filter into a Camera sensor for adjustment through an i2c channel;
the timer is defined as the current Camera sensor light incoming quantity.
Preferably, the express mobile terminal further includes:
application for providing services and interface control of the scan engine;
application Framework for providing a corresponding API for the scan engine;
camera Application Framework, android provided camera application framework;
the HAL is a hardware abstraction layer and is used for linking the Camera driver and the Camera Service;
JNI for providing scan engine service and interface for hardware layer communication;
library for providing a scan algorithm decoding library and a scan engine setup interface;
kernel, used for realizing the bottom control logic of the scanning engine;
the Application, application Framework, JNI, libraries, HAL and Kernel are sequentially connected to form an Android Camera function architecture, and the scanning engine can work normally through the Android Camera function architecture;
the Android is defined as an Android system;
the hardware layer is defined as a HAL hardware abstraction layer of an Android Camera function architecture;
the Camera driver is defined as a Camera driver;
the Camera Service is defined as a Camera Service mechanism provided by Android and used for interacting with the bottom layer.
Preferably, the scanning engine comprises a camera shooting component, a sighting component, a light supplementing component, a main board and a shell, wherein the camera shooting component, the sighting component, the light supplementing component and the main board are all assembled on the shell, the camera shooting component, the sighting component and the light supplementing component are all electrically connected with the main board, and the main board is an MT6737 processor.
Preferably, the casing includes base, support and closing cap, the base constitutes an installation cavity that is used for the fixed bolster with the closing cap joint, make a video recording subassembly, aim subassembly, light filling subassembly and mainboard all assemble on the support, the opening is equipped with waterproof apron, still be equipped with shift knob on the base and be used for the mainboard to connect the electric connector of electricity, shift knob is connected with the mainboard electricity, the one side middle part of support has been seted up and has been used for assembling the camera opening of making a video recording the subassembly, and the camera opening both sides of support all are equipped with the light filling mouth that is used for assembling light filling subassembly, are equipped with the light filling mouth that is used for assembling the light filling subassembly between the camera opening of support and one side thereof.
Preferably, the camera shooting assembly comprises a control chip, a connector and a camera, wherein the camera is controlled by the control chip, and the control chip is an OV9281 chip;
three paths of power supply interfaces VCAMD_PMU, VCAMD_IO_PMU and VCAMA_PMU of the control chip are connected with pmic of the main board and used for supplying power to the control chip;
the RST reset pin of the control chip is connected with the IO port of the main board for controlling hardware reset, and the CLK pin is connected with the MCLK pin of the CPU of the main board for providing a master clock of the control chip;
the strobe pin of the control chip is connected to the IO pin of the main board and used for interrupt control;
the i2c channel clock of the control chip is connected with the i2c interface of the main board through a connector, and is used for a CPU of the main board to send a control instruction to control the camera to work, wherein the i2c channel comprises an SDA pin and an SCL pin of the control chip;
two mipi paths are reserved in a data channel of the control chip and are used for transmitting image data back to an ISP processor of a CPU of the main board for processing.
Preferably, the sighting component comprises a power supply circuit and a laser lamp, wherein the power supply circuit is electrically connected with the laser lamp and supplies power for the laser lamp, an overheat protection device is arranged between the laser lamp and the power supply circuit, the overheat protection device is a diode, and an enabling pin of the laser lamp is connected with an IO port of a main board and is used for controlling the on and off of the laser lamp.
Preferably, the light supplementing component comprises an LED driving chip and a lamp, the lamp is electrically connected with an SDA pin and an SCL pin of the LED driving chip, the LED driving chip is an AW3643 chip, and a HWEN pin of the LED driving chip is connected with an IOVDD of the main board to supply power.
The beneficial effects are that: the acquisition of the original image is realized by optimizing the Camera sensor parameter, fixing the frame rate and fixing the gain, skipping the platform ISP processing scheme, the express mobile terminal acquires the ID of the scanning engine, acquires the imgbuffer memory address of the Pass1, the Pass1 acquires the original image acquired by the Camera sensor, converts the original image into the RAW8 format, sends the converted original image into the image average brightness algorithm flow, realizes the quick exposure processing of the original image, quickly acquires clear bar code images, acquires the imgbuffer virtual memory address of the Pass2, writes the original image acquired by the Pass1 into the imgbuffer virtual memory of the Pass2, returns the original image acquired by the Pass2 to the application layer, acquires the returned original image at the application layer part of the scanning engine, sends the original image into the decoding library, and outputs the decoding result by the decoding library, thereby greatly improving the accuracy of acquiring commodity information, effectively enhancing the working efficiency of the scanning engine and meeting the social demands; meanwhile, an overheat protection device is added in a power supply circuit of the laser lamp, so that overhigh temperature caused by overlarge power consumption is prevented, and the service life of the whole laser lamp is greatly prolonged.
Drawings
Fig. 1 is a specific implementation step diagram of an image rapid acquisition method for an express mobile terminal;
FIG. 2 is a diagram of steps for implementing fixed frame rate in an embodiment of the present invention;
FIG. 3 is a flowchart of an image average brightness algorithm according to an embodiment of the present invention;
fig. 4 is a block diagram of an Android Camera function architecture in an embodiment of the present invention;
FIG. 5 is a schematic diagram of an exploded view of a scan engine for an express mobile terminal;
FIG. 6 is a combined state diagram of the scan engine for an express mobile terminal;
fig. 7 is a schematic diagram of a part of the structure of a scan engine for an express mobile terminal;
fig. 8 is a schematic diagram of a support structure of a scan engine for an express mobile terminal;
FIG. 9 is a circuit diagram of an imaging assembly in an embodiment of the invention;
FIG. 10 is a circuit diagram of an aiming assembly in an embodiment of the present invention;
fig. 11 is a circuit diagram of a light supplementing assembly according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples:
referring to fig. 1 to 11, the present embodiment provides a method for quickly acquiring an image of an express mobile terminal, which includes the following steps:
s1, optimizing Camera sensor parameters, fixing frame rate and gain, skipping a platform ISP processing scheme, and obtaining an original image;
s2, the express mobile terminal acquires the ID of the scanning engine and acquires the imgbuffer memory address of the pass 1;
s3, the pass1 obtains an original image obtained by the Camera sensor, converts the original image into a RAW8 format, and sends the original image after format conversion into an image average brightness algorithm flow to realize quick exposure processing of the original image;
as shown in fig. 3, the image average brightness algorithm in step S3 is as follows:
(1) starting an image average brightness algorithm thread, acquiring an original image after format conversion, and extracting the brightness of the current original image;
(2) setting a brightness interval, judging and adjusting according to the brightness of the current pixel point in the brightness interval;
(3) converting the adjusted brightness value into a filter, defining the filter as the current light inlet quantity of the Camera sensor, and writing the light inlet quantity into the Camera sensor through an i2c channel for adjustment;
s4, acquiring an imgbuffer virtual memory address of the pass2, and writing the original image processed by the pass1 into the imgbuffer virtual memory of the pass 2;
s5, the original image in the Pass2 is returned to the application layer, and the application layer part of the scanning engine acquires the returned original image and sends the original image to the decoding library;
s6, outputting a decoding result by the decoding library, obtaining bar code information, calling a drive of the express mobile terminal to close a data stream of the scanning engine, and completing one-time quick scanning;
pass1 is defined as a process of acquiring an original image output by the Camera sensor; the pass2 is defined as a process of performing 3A algorithm image processing on an original image output by the Camera sensor and converting the original image into identifiable image information; camera sensor is defined as a Camera sensor; the imgbuffer memory address is defined as the memory size of the original image obtained in the pass1 flow; defining an imgbuffer virtual memory address as the memory size of the acquired image in the pass2 flow; the application layer is defined as a part of the Android framework which is interacted with by a user; the application layer portion of the scan engine is defined as a sub-module of the Camera sensor in the application layer.
In the practical application process, the acquisition of the original image is realized by optimizing the Camera sensor parameter, fixing the frame rate and fixing the gain, skipping the platform ISP processing scheme, the express mobile terminal acquires the ID of the scanning engine, acquires the imgbuffer memory address of the Pass1, the Pass1 acquires the original image acquired by the Camera sensor, converts the original image into the RAW8 format, sends the converted original image into the image average brightness algorithm flow, realizes the quick exposure processing of the original image, quickly acquires clear bar code images, acquires the imgbuffer virtual memory address of the Pass2, writes the original image acquired by the Pass1 into the imgbuffer virtual memory of the Pass2, returns the original image acquired by the Pass2 to the application layer, acquires the returned original image at the application layer part of the scanning engine and sends the decoded image to the decoding library, and the decoding library outputs the decoded result to acquire the bar code information, thereby greatly improving the accuracy of acquiring commodity information, effectively enhancing the working efficiency of the scanning engine and meeting the social demands.
In step S1, the fixed frame rate means that the lighting time of the aiming lamp in the scanning engine is controlled within the frame interval of the scanning engine diagram, the influence of the red light emitted by the aiming lamp on the image is removed, the control logic of the aiming lamp is implemented in a kernel and combined with the driver of the Camera sensor, wherein, on hardware, the strobe pin of the Camera sensor is connected to the interrupt of the platform end, on software, the interrupt and the timer are combined, the aiming lamp is controlled by using a common IO port, namely, the level of the strobe pin of the Camera sensor is controlled to change within the frame interval of the Camera sensor, the interrupt of the platform end is used for responding to the change of the strobe pin, the aiming lamp is controlled in the interrupt program, and the timer of the time within the frame interval is set, the aiming lamp is turned off, so that the lighting time of the aiming lamp in the scanning engine is controlled within the frame interval of the scanning engine diagram, as shown in fig. 2, the specific implementation steps are as follows:
s11, search query is carried out according to the Camera sensor in the sensor list;
s12, after the express mobile terminal is started, POWER ON;
s13, calling an OPEN function, reading the id of the Camera sensor, confirming whether I2C communication of the Camera sensor is normal, and initializing a member variable of the sensor_info;
s14, initializing a Camera sensor according to the configured Camera sensor initialization parameter;
s15, calling preview to prepare for preview;
s16, streaming on, and starting transmission of image data;
s17, controlling a strobe pin of the Camera sensor to change in level at each frame interval, and setting the timing time of a timer to be less than the time of one frame of image;
s18, calling an interrupt processing function of a timer, turning on the aiming lamp and the light supplementing lamp, and turning off the aiming lamp and keeping the light supplementing lamp on for a long time when the timer is up in one frame;
s19, if the timer is overtime or the code scanning is successful, the stream is turned off, and the light supplementing lamp is turned off;
kernel is defined as a kernel layer in the Android architecture; timer is defined as a timer on software for controlling the elimination of red light emitted by the aiming lamp; the platform end is defined as a main board end of the scanning engine; the sensor list is defined as a camera sensor list provided by the MTK platform; the search is defined as inquiring the model of the Camera sensor corresponding to the scanning engine; power ON is defined as scan engine POWER-ON; the OPEN function is defined as the scan engine's on function; sensor_info is defined as the parameter configuration of the scan engine; scanner init is defined as the initialization flow of the scan engine; preview is defined as the preview flow of the scan engine; stream on is defined as the open Stream action of the scan engine; stream off is defined as the off-stream action of the scan engine.
As shown in fig. 4, the express mobile terminal further includes:
application for providing services and interface control of the scan engine;
application Framework for providing a corresponding API for the scan engine;
camera Application Framework, android provided camera application framework;
the HAL is a hardware abstraction layer and is used for linking the Camera driver and the Camera Service;
(1) adding HAL parameters provided based on SENSOR selection, including AE (automatic exposure) parameters, AWB (automatic white balance) parameters and the like;
(2) adding a scan engine ID to a sensor, cpp, for implementing user space and kernel space transfer commands;
(3) and adding format conversion of the image under the Mtkcam architecture, copying the processed image, customizing a brightness average algorithm and the like.
JNI for providing scan engine service and interface for hardware layer communication;
library for providing a scan algorithm decoding library and a scan engine setup interface;
kernel, used for realizing the bottom control logic of the scanning engine;
(1) designing a scanning engine driver by referring to an MTK platform driver architecture:
a. member variable of sensor_info is configured: sensor_id, timer, mclk, i2c_speed, mipi_lane_num, etc.;
b. configuring a window size imgsensor_winsize_info of a scan engine;
c. configuring initialization parameters according to the Camera sensor;
(2) adding a scan engine ID to kdsensortlist. Cpp for linking the sensorist. Cpp of the HAL;
and adding a power-on time sequence of the scanning engine to ensure that the scanning engine can work normally.
The Application, application Framework, JNI, libraries, HAL and Kernel are sequentially connected to form an Android Camera function architecture, and the scanning engine can be ensured to work normally through the Android Camera function architecture; android is defined as an Android system; the hardware layer is defined as a HAL hardware abstraction layer of the Android Camera function architecture; the Camera driver is defined as a Camera driver; camera Service is defined as a Camera Service mechanism provided by Android for interacting with the underlying layer.
Referring to fig. 5, 6 and 7, the scan engine includes a camera module 100, a collimator module 101, a light supplementing module 102, a main board 103 and a housing 104, wherein the camera module 100, the collimator module 101, the light supplementing module 102 and the main board 103 are all assembled on the housing 104, and the camera module 100, the collimator module 101 and the light supplementing module 102 are all electrically connected with the main board 103, the main board 103 is an MT6737 processor, the MT6737 processor provides higher-end network application, improves display effect and is more excellent in image signal processing technology, so that the module and memory cost can be reduced to the minimum, the requirements of middle-low end markets are met, and the performance and power efficiency performance exceeding the same-level products are achieved.
As shown in fig. 5, the casing 104 includes a base 141, a support 142 and a cover 143, the base 141 and the cover 143 are combined to form a mounting cavity for fixing the support 142, the camera assembly 100, the aiming assembly 101, the light supplementing assembly 102 and the main board 103 are all assembled on the support 142, a waterproof cover plate 144 is arranged at the opening, a switch button 105 and a power connector 106 for connecting the main board 103 are further arranged on the base 141, the switch button 105 is electrically connected with the main board 103, as shown in fig. 8, a camera opening 105 for assembling the camera assembly 100 is arranged in the middle of one surface of the support 142, light supplementing openings 106 for assembling the light supplementing assembly 102 are arranged at two sides of the camera opening 105 of the support 142, an aiming opening 107 for assembling the aiming assembly 101 is arranged between the camera opening 105 of the support 142 and the light supplementing opening 106 at one side of the camera opening, and the positioning function of the support 142 is adopted to greatly enhance the internal compactness and firmness of the scanning engine.
The camera assembly 100 comprises a control chip, a connector and a camera 108, wherein the camera 108 is controlled by the control chip, and the control chip is an OV9281 chip; as shown in fig. 9, with the circuit structure of the camera 108 commonly used in the prior art, three power supply interfaces vcamd_pmu, vcamd_io_pmu and vcama_pmu of the control chip are connected to pmic of the motherboard 103 for power supply of the control chip; the RST reset pin of the control chip is connected with the IO port of the main board 103 for controlling hardware reset, and the CLK pin is connected with the MCLK pin of the CPU of the main board 103 for providing a master clock of the control chip; the strobe pin of the control chip is connected to the IO pin of the main board 103 and used for interrupt control; the i2c channel clock of the control chip is connected with the i2c interface of the main board 103 through a connector, the CPU of the main board 103 is used for sending a control instruction to control the camera 108 to work, the i2c channel comprises an SDA pin and an SCL pin of the control chip, the connector is a BM20B (0.8) -24DS-0.4V (51) connector, the design of the main board is not limited by the BM20B (0.8) -24DS-0.4V (51) connector, the universality is good, the vibration impact resistance is realized, and the smooth, continuous and reliable current circulation is ensured; two mipi paths are reserved in the data channel of the control chip for processing by the ISP processor of the CPU that transmits the image data back to the motherboard 103.
The aiming assembly 101 comprises a power supply circuit and a laser lamp 109, wherein the power supply circuit is electrically connected with the laser lamp 109 and supplies power to the laser lamp 109, and it is required to explain that the laser lamp 109 is the aiming lamp, as shown in fig. 10, the aiming lamp circuit structure commonly used in the prior art is adopted, and an overheat protection device is arranged between the laser lamp 109 and the power supply circuit, and is a diode, so that overhigh temperature caused by overlarge power consumption is prevented through the shunting and partial pressure effect of the diode, the overall service life is greatly prolonged, and an enabling pin of the laser lamp 109 is connected with an IO port of the main board 103 and is used for controlling the on and off of the laser lamp 109.
The light supplementing assembly 102 comprises an LED driving chip and a lamp 110, the lamp 110 is electrically connected with an SDA pin and an SCL pin of the LED driving chip, it is also required to say that the lamp 110 is a light supplementing lamp, the LED driving chip is an AW3643 chip, a HWEN pin of the LED driving chip is connected with an IOVDD pin of the main board 103 to supply power, as shown in fig. 11, a light supplementing lamp circuit structure commonly used in the prior art is adopted, two or more lamps 100 can be regulated and controlled through the LED driving chip, and the light emitting directions of the lamps 100 and the laser lamp 109 are consistent, so that the overall irradiation effect is increased, and the working current of the lamps 100 is limited to be not more than 1.5A in hardware for better controlling the power consumption.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structural changes made by the description of the present invention and the accompanying drawings or direct/indirect application in other related technical fields are included in the scope of the invention.

Claims (8)

1. The quick image acquisition method for the express mobile terminal is characterized by comprising the following steps of:
s1, optimizing Camera sensor parameters, fixing frame rate and gain, skipping a platform ISP processing scheme, and obtaining an original image;
s2, the express mobile terminal acquires the ID of the scanning engine and acquires the imgbuffer memory address of the pass 1;
s3, the pass1 obtains an original image obtained by the Camera sensor, converts the original image into a RAW8 format, and sends the original image after format conversion into an image average brightness algorithm flow to realize quick exposure processing of the original image;
s4, acquiring an imgbuffer virtual memory address of the pass2, and writing the original image processed by the pass1 into the imgbuffer virtual memory of the pass 2;
s5, the original image in the Pass2 is returned to the application layer, and the application layer part of the scanning engine acquires the returned original image and sends the original image to the decoding library;
s6, outputting a decoding result by the decoding library, obtaining bar code information, calling a drive of the express mobile terminal to close a data stream of the scanning engine, and completing one-time quick scanning;
the pass1 is defined as a flow for acquiring an original image output by the Camera sensor;
the pass2 is defined as a process of performing 3A algorithm image processing on an original image output by the Camera sensor and converting the original image into identifiable image information;
the Camera sensor is defined as a Camera sensor;
the imgbuffer memory address is defined as the memory size of the original image obtained in the pass1 flow;
the imgbuffer virtual memory address is defined as the memory size of the acquired image in the pass2 flow;
the application layer is defined as a part of the Android frame which is interacted with a user;
the application layer part of the scanning engine is defined as a submodule of a Camera sensor in the application layer;
the fixed frame rate in step S1 means that the lighting time of the aiming lamp in the scanning engine is controlled within the frame interval of the scanning engine graph, the influence of red light emitted by the aiming lamp on the image is removed, the control logic of the aiming lamp is realized in a kernel and combined with the driver of the Camera sensor, wherein on hardware, the strobe pin of the Camera sensor is connected to the interrupt of the platform end, on software, the interrupt and the timer are combined, the aiming lamp is controlled by a common IO port, namely, the level change of the strobe pin of the Camera sensor is controlled within the frame interval of the Camera sensor, the interrupt of the platform end is used for responding the change of the strobe pin, the aiming lamp is controlled in the interrupt program, the timer of the time within the frame interval is set, the aiming lamp is turned off, the lighting time of the aiming lamp in the scanning engine is controlled within the frame interval of the scanning engine, and the specific implementation steps are as follows:
s11, search query is carried out according to the Camera sensor in the sensor list;
s12, after the express mobile terminal is started, POWER ON;
s13, calling an OPEN function, reading the id of the Camera sensor, confirming whether I2C communication of the Camera sensor is normal, and initializing a member variable of the sensor_info;
s14, initializing a Camera sensor according to the configured Camera sensor initialization parameter;
s15, calling preview to prepare for preview;
s16, streaming on, and starting transmission of image data;
s17, controlling a strobe pin of the Camera sensor to change in level at each frame interval, and setting the timing time of a timer to be less than the time of one frame of image;
s18, calling an interrupt processing function of a timer, turning on the aiming lamp and the light supplementing lamp, and turning off the aiming lamp and keeping the light supplementing lamp on for a long time when the timer is up in one frame;
s19, if the timer is overtime or the code scanning is successful, the stream is turned off, and the light supplementing lamp is turned off;
the kernel is defined as a kernel layer in the Android architecture;
the timer is defined as a timer which is used for controlling elimination of red light emitted by the aiming lamp on software;
the platform end is defined as a main board end of the scanning engine;
the sensor list is defined as a camera sensor list provided by the MTK platform;
the search is defined as inquiring the Camera sensor model corresponding to the scanning engine;
the POWER ON is defined as scan engine POWER-ON;
the OPEN function is defined as a function of the scan engine on;
the sensor_info is defined as the parameter configuration of the scanning engine;
the Scanner init is defined as an initialization flow of the scanning engine;
the preview is defined as a preview flow of the scanning engine;
the Stream on is defined as the open Stream action of the scanning engine;
the stream off is defined as the off-stream action of the scan engine.
2. The method for rapidly acquiring the image of the express mobile terminal according to claim 1, wherein the image average brightness algorithm in the step S3 is as follows:
starting an image average brightness algorithm thread, acquiring an original image after format conversion, and extracting the brightness of the current original image;
setting a brightness interval, judging and adjusting according to the brightness of the current pixel point in the brightness interval;
converting the adjusted brightness value into a filter, and writing the filter into a Camera sensor for adjustment through an i2c channel;
the timer is defined as the current Camera sensor light incoming quantity.
3. The method for quickly acquiring the image of the express mobile terminal according to claim 1, wherein the express mobile terminal further comprises:
application for providing services and interface control of the scan engine;
application Framework for providing a corresponding API for the scan engine;
camera Application Framework, android provided camera application framework;
the HAL is a hardware abstraction layer and is used for linking the Camera driver and the Camera Service;
JNI for providing scan engine service and interface for hardware layer communication;
library for providing a scan algorithm decoding library and a scan engine setup interface;
kernel, used for realizing the bottom control logic of the scanning engine;
the Application, application Framework, JNI, libraries, HAL and Kernel are sequentially connected to form an Android Camera function architecture, and the scanning engine can work normally through the Android Camera function architecture;
the Android is defined as an Android system;
the hardware layer is defined as a HAL hardware abstraction layer of an Android Camera function architecture;
the Camera driver is defined as a Camera driver;
the Camera Service is defined as a Camera Service mechanism provided by Android and used for interacting with the bottom layer.
4. The method for rapidly acquiring the image of the express mobile terminal according to claim 1, wherein the scanning engine comprises a camera module (100), an aiming module (101), a light supplementing module (102), a main board (103) and a shell (104), the camera module (100), the aiming module (101), the light supplementing module (102) and the main board (103) are all assembled on the shell (104), and the camera module (100), the aiming module (101) and the light supplementing module (102) are all electrically connected with the main board (103), and the main board (103) is an MT6737 processor.
5. The quick image acquisition method for the express mobile terminal according to claim 4, wherein the casing (104) comprises a base (141), a support (142) and a sealing cover (143), the base (141) and the sealing cover (143) are combined to form a mounting cavity for fixing the support (142), the camera assembly (100), the aiming assembly (101), the light supplementing assembly (102) and the main board (103) are all assembled on the support (142), the opening is provided with a waterproof cover board (144), the base (141) is further provided with a switch button (105) and a power connector (106) for connecting the main board (103), the switch button (105) is electrically connected with the main board (103), a camera opening (105) for assembling the camera assembly (100) is formed in the middle of one surface of the support (142), light supplementing openings (106) for assembling the light supplementing assembly (102) are formed in two sides of the camera opening (105) of the support (142), and the aiming assembly (107) is formed between the camera opening (105) of the support (142) and the light supplementing assembly (106) on one side.
6. The rapid image acquisition method for an express mobile terminal according to claim 4 or 5, wherein the image pickup assembly (100) comprises a control chip, a connector and a camera (108), the camera (108) is controlled by the control chip, and the control chip is an OV9281 chip;
three paths of power supply interfaces VCAMD_PMU, VCAMD_IO_PMU and VCAMA_PMU of the control chip are connected with pmic of the main board (103) and used for supplying power to the control chip;
the RST reset pin of the control chip is connected with the IO port of the main board (103) for controlling hardware reset, and the CLK pin is connected with the MCLK pin of the CPU of the main board (103) for providing a master clock of the control chip;
the strobe pin of the control chip is connected to the IO pin of the main board (103) and used for interrupt control;
the i2c channel clock of the control chip is connected with an i2c interface of the main board (103) through a connector, and a CPU (Central processing Unit) of the main board (103) sends a control instruction to control the camera (108) to work, wherein the i2c channel comprises an SDA pin and an SCL pin of the control chip;
two mipi paths are reserved in the data channel of the control chip, and are used for processing the image data transmitted back to the ISP processor of the CPU of the main board (103).
7. The method for quickly acquiring the image of the express mobile terminal according to claim 4 or 5, wherein the aiming assembly (101) comprises a power circuit and a laser lamp (109), the power circuit is electrically connected with the laser lamp (109) and supplies power to the laser lamp (109), an overheat protection device is arranged between the laser lamp (109) and the power circuit, the overheat protection device is a diode, and an enabling pin of the laser lamp (109) is connected with an IO port of the main board (103) and is used for controlling the on and off of the laser lamp (109).
8. The method for quickly acquiring the image of the express mobile terminal according to claim 4 or 5, wherein the light supplementing component (102) comprises an LED driving chip and a lamp (110), the lamp (110) is electrically connected with an SDA pin and an SCL pin of the LED driving chip, the LED driving chip is an AW3643 chip, and a HWEN pin of the LED driving chip is connected with an IOVDD pin of the main board (103) to supply power.
CN202210164822.8A 2022-02-23 2022-02-23 Quick image acquisition method for express mobile terminal Active CN114554091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210164822.8A CN114554091B (en) 2022-02-23 2022-02-23 Quick image acquisition method for express mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210164822.8A CN114554091B (en) 2022-02-23 2022-02-23 Quick image acquisition method for express mobile terminal

Publications (2)

Publication Number Publication Date
CN114554091A CN114554091A (en) 2022-05-27
CN114554091B true CN114554091B (en) 2023-10-20

Family

ID=81677721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210164822.8A Active CN114554091B (en) 2022-02-23 2022-02-23 Quick image acquisition method for express mobile terminal

Country Status (1)

Country Link
CN (1) CN114554091B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203191998U (en) * 2013-04-08 2013-09-11 浪潮集团有限公司 Rapid identification device for two-dimensional code
CN103593638A (en) * 2013-11-21 2014-02-19 北京象开科技有限公司 Low-power-consumption bar code decoding equipment based on image processing
CN105763817A (en) * 2016-03-14 2016-07-13 天逸瑞狮(苏州)口腔医疗科技股份有限公司 Image erasing device and method, and image scanning system
CN106941579A (en) * 2017-03-03 2017-07-11 东软集团股份有限公司 The method and device of image scanning
CN107045616A (en) * 2017-01-09 2017-08-15 东软集团股份有限公司 The scan method and scanning means of scanning engine
CN108416239A (en) * 2018-01-31 2018-08-17 深圳盈达信息科技有限公司 A kind of bar code identifies the control method of engine and its reduction power consumption
CN109815766A (en) * 2019-01-25 2019-05-28 深圳市优博讯科技股份有限公司 A kind of bar code scanning method, device, mobile terminal and readable storage medium storing program for executing
CN110110716A (en) * 2019-05-08 2019-08-09 惠州市桑莱士智能科技股份有限公司 A kind of high-definition camera of the automatic focusing of intelligent scanning two dimensional code

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203191998U (en) * 2013-04-08 2013-09-11 浪潮集团有限公司 Rapid identification device for two-dimensional code
CN103593638A (en) * 2013-11-21 2014-02-19 北京象开科技有限公司 Low-power-consumption bar code decoding equipment based on image processing
CN105763817A (en) * 2016-03-14 2016-07-13 天逸瑞狮(苏州)口腔医疗科技股份有限公司 Image erasing device and method, and image scanning system
CN107045616A (en) * 2017-01-09 2017-08-15 东软集团股份有限公司 The scan method and scanning means of scanning engine
CN106941579A (en) * 2017-03-03 2017-07-11 东软集团股份有限公司 The method and device of image scanning
CN108416239A (en) * 2018-01-31 2018-08-17 深圳盈达信息科技有限公司 A kind of bar code identifies the control method of engine and its reduction power consumption
CN109815766A (en) * 2019-01-25 2019-05-28 深圳市优博讯科技股份有限公司 A kind of bar code scanning method, device, mobile terminal and readable storage medium storing program for executing
CN110110716A (en) * 2019-05-08 2019-08-09 惠州市桑莱士智能科技股份有限公司 A kind of high-definition camera of the automatic focusing of intelligent scanning two dimensional code

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
PIC单片机在模具条码识别系统中的应用;叶少龙;刘建群;吴积荣;梁景中;;广东工业大学学报(02);全文 *
基于定时中断的实时按键任务处理设计;符潇天;黄明;彭召敏;张轩;崔进宝;;工业技术创新(02);全文 *
面向移动终端条码识别系统的研究与实现;庄华强;;通讯世界(13);全文 *

Also Published As

Publication number Publication date
CN114554091A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
US9519815B2 (en) Optical indicia reading terminal with color image sensor
US9996720B2 (en) Indicia reading terminal processing plurality of frames of image data responsively to trigger signal activation
US9256280B2 (en) Digital camera which detects a connection to an external device
US7460170B2 (en) Computer expansion module having image capture and decoding functionality
US7502559B2 (en) Camera lens assembly for mobile phone
US11516455B2 (en) Electronic device and method for controlling the same
US7878406B2 (en) Optical reader
Duque et al. Unleashing the power of LED-to-camera communications for IoT devices
US20230206205A1 (en) Fixed retail scanner with multi-port network switch and related methods
CN114554091B (en) Quick image acquisition method for express mobile terminal
CN203038289U (en) Bar code reading decoding module and hand-held electronic device
KR20080101554A (en) Barcode reader module for recognizing rfid to be loaded an rugged pda
US20130048727A1 (en) Optical indicia reading terminal with color image sensor
CN104966039A (en) Barcode identification engine for acquiring image data
CN111382590A (en) Small-size bar code image acquisition unit
CN205038658U (en) A bar code recognition engine for obtaining image data
CN104866798A (en) Bar-code identifying and reading engine for obtaining image data
CN115022491B (en) Camera module and electronic equipment
CA2633437A1 (en) Indicia reading terminal processing plurality of frames of image data responsively to trigger signal activation
CN113703248B (en) 3D structured light module and depth map point cloud image acquisition method based on same
CN204791045U (en) A bar code recognition engine for obtaining image data
CN205430430U (en) Two -dimensional identification system
CN109583258A (en) A kind of bar code acquisition mould group
CN205451092U (en) Bar code reading device
CN213276653U (en) Small-size bar code image acquisition unit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant