CN112489322A - Quick code scanning method for POS machine product - Google Patents

Quick code scanning method for POS machine product Download PDF

Info

Publication number
CN112489322A
CN112489322A CN202011296083.5A CN202011296083A CN112489322A CN 112489322 A CN112489322 A CN 112489322A CN 202011296083 A CN202011296083 A CN 202011296083A CN 112489322 A CN112489322 A CN 112489322A
Authority
CN
China
Prior art keywords
code scanning
power consumption
camera
scanning
chip
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.)
Granted
Application number
CN202011296083.5A
Other languages
Chinese (zh)
Other versions
CN112489322B (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.)
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
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 Shanghai Sunmi Technology Group Co Ltd, Shenzhen Michelangelo Technology Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN202011296083.5A priority Critical patent/CN112489322B/en
Publication of CN112489322A publication Critical patent/CN112489322A/en
Application granted granted Critical
Publication of CN112489322B publication Critical patent/CN112489322B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07GREGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
    • G07G1/00Cash registers
    • G07G1/0036Checkout procedures
    • G07G1/0045Checkout procedures with a code reader for reading of an identifying code of the article to be registered, e.g. barcode reader or radio-frequency identity [RFID] reader
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Cash Registers Or Receiving Machines (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a quick code scanning method for a POS machine product, which is simple and practical and has low cost. The method comprises the steps of completing the starting of a camera/soft scanning terminal before a code scanning application is started and a code scanning button is not clicked by modifying the logic of the code scanning application, initializing a chip register, and realizing that a camera does not output data streams through a software means. The whole process can be carried out simultaneously with the loading of resources and configuration in the self-starting process of code scanning application, extra power consumption cannot be caused in the state of the chip before code scanning is not triggered, when code scanning action is triggered externally, the data stream of the camera is opened, the time from key pressing to obtaining the first frame at this time is approximately equal to the frame rate of the chip, and when code scanning is finished, the graphic data stream is closed, so that the camera or the soft wharf scanning module enters a low-power consumption state, and the method can realize the fastest time obtaining of the graphic data frame and the low power consumption on software before code scanning application quits.

Description

Quick code scanning method for POS machine product
Technical Field
The invention relates to the technical field of POS machine scanning, in particular to a method for promoting quick code scanning of a camera module and a soft decoding head in a PDA and a POS machine calling machine using an Android system.
Background
Nowadays, POS and PDA products are widely used in many fields such as mobile payment, code scanning in the external field, and inventory in the internal field, using Camera or wharf scanning. Especially in the scenes of scanning codes by using PDA and POS at high frequency such as express delivery, warehouse and logistics, namely, the scanning is a trend. This presents a significant challenge to the design and compromise of power consumption for the entire code-scanning software system.
At present, most POS machines and PDAs use an Android system developed by Google based on Linux kernel, software developers use a standard frame in the system to develop a function of scanning codes by using a camera module and a scanning head (hereinafter referred to as a soft decoding head) without a decoding module unit, a software API interface of a system layer has a plain text specified execution sequence, and the design of the ring-and-loop deduction is originally designed to realize the photographing/video recording function of a mobile phone more easily, so that the developers can develop application programs without knowing specific bottom logic, but the frame is extremely bloated for code scanning products, and cannot meet the use requirement of a target scene on code scanning.
The scheme that is used in large quantity at present is that the camera/soft-scanning wharf is started in sequence from clicking a code scanning key, a chip register is initialized, the chip outputs frame data, automatic exposure adjustment is carried out according to each frame data, bar code identification is carried out frame by frame, and the camera/soft-scanning wharf is closed after the identification is successful. Generally, a 13M,5M,1M pixel camera used in POS products is, for example, about 300ms from the time of clicking a code scanning key to the time of taking a first frame, and when an automatic exposure algorithm of a chip adjusts frame by frame to frame data that can be successfully decoded, the whole process is about 400ms, and the time for completing one code scanning operation is about 500 ms. The scheme can be matched with an algorithm with a poor decoding effect or a product with a low camera frame rate for a longer time, and an obvious pause phenomenon can occur in the use process of a high-frequency scene, so that the experience of a user is seriously influenced.
Disclosure of Invention
The invention aims to provide a code scanning method which is low in power consumption and fast in code scanning.
In order to achieve the above object, the present invention provides a fast code scanning method for a POS machine product, comprising the steps of:
step 1: starting code scanning equipment;
step 2: initializing a camera module; initializing a CMOS register and a focusing motor, and closing an image data stream to enter a low power consumption state during initialization;
and step 3: triggering code scanning; starting an image data stream to obtain an image;
and 4, step 4: adjusting exposure;
and 5: scanning a bar code;
step 6: finishing code scanning; closing the image data flow and entering a low power consumption mode; waiting for next trigger code scanning, executing the step 3 when the trigger is triggered, and executing the step 7 when the code scanning application is closed;
and 7: the code scanning application is closed.
Further, in step 1, the starting code scanning device is: after the Android starts activity, the Camera module or the soft decoding head module is powered on when the resources are loaded.
Further, in step 2, initializing a CMOS register and a focus motor, and writing an initialization register list required by a corresponding CMOS model through an I2C bus and then executing; the software closes the data flow of the image, at the moment, the chip enters a low power consumption state, and the working mode is configured into a mode of fixing the exposure time and the gain; the focus motor is set to a fixed focus mode.
Further, in step 3, the image data stream is started, and the data frame output by the chip is retrieved through system callback and sent to the decoding library.
Further, in step 4, the adjusting exposure is: and adjusting the exposure parameters of the next frame (or N frames) of image according to the current image.
Compared with the prior art, the invention has the advantages that: the method is simple and practical and has low cost. The method comprises the steps of completing the starting of a camera/soft scanning terminal before a code scanning application is started and a code scanning button is not clicked by modifying the logic of the code scanning application, initializing a chip register, and realizing that a camera does not output data streams through a software means. The whole process can be carried out simultaneously along with the loading of resources and configuration in the self-starting process of code scanning application, the state of a chip before code scanning is not triggered can not cause extra power consumption, when code scanning action is triggered externally, data flow of a camera is opened, the time from key pressing to obtaining a first frame at this time is approximately equal to the frame rate of the chip (30 frames are output and approximately equal to 33ms, and 60 frames are output and approximately equal to 16ms), and when code scanning is finished, the graphic data flow is closed so that a camera or a soft scanning wharf module enters a low power consumption state, and graphic data frames and low power consumption can be obtained in the fastest time on software by using the method before code scanning application is not quitted. And when the code scanning program is closed or the machine enters a dormant state, executing the action of closing the camera.
According to the code scanning method, when the code scanning is triggered, the action of starting the camera is not needed, and the image data can be obtained only by starting the image data stream, so that the time for obtaining the image is greatly reduced; the CMOS chip is timely and accurately adjusted, so that an ideal image can be obtained in the next frame; the quick code scanning and the low power consumption can be considered; the focusing process is omitted, so that the bar codes within the field depth range can be identified more quickly.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be further described below.
The invention provides a quick code scanning method for a POS machine product, which comprises the following steps:
step 1: starting code scanning equipment; after the Android starts activity, the Camera module or the soft decoding head module is powered on when the resources are loaded.
Step 2: initializing a camera module; initializing a camera module: initializing the CMOS register and the focusing motor, and writing an initialization register list required by the corresponding CMOS model through an I2C bus. The software closes the data flow of the image, at this time, the chip enters a low power consumption state, and the working mode is configured into a mode of fixing the exposure time and the gain. The focus motor is set to a fixed focus mode.
And step 3: triggering code scanning; and opening an image data stream, and calling back the data frame output by the acquisition chip through the system to send the data frame to a decoding library.
And 4, step 4: adjusting exposure; and adjusting the exposure parameters of the next frame (or N frames) of image according to the current image.
And 5: scanning a bar code; and performing bar code identification on the picture.
Step 6: finishing code scanning; closing the image data flow and entering a low power consumption mode; and (5) waiting for next trigger code scanning, executing the step (3) when the trigger is triggered, and executing the step (7) when the code scanning application is closed.
And 7: closing the code scanning application; exiting the code scanning application and powering down the Camera module or the wharf scanning module.
The method is simple and practical and has low cost. The method comprises the steps of completing the starting of a camera/soft scanning terminal before a code scanning application is started and a code scanning button is not clicked by modifying the logic of the code scanning application, initializing a chip register, and realizing that a camera does not output data streams through a software means. The whole process can be carried out simultaneously along with the loading of resources and configuration in the self-starting process of code scanning application, the state of a chip before code scanning is not triggered can not cause extra power consumption, when code scanning action is triggered externally, data flow of a camera is opened, the time from key pressing to obtaining a first frame at this time is approximately equal to the frame rate of the chip (30 frames are output and approximately equal to 33ms, and 60 frames are output and approximately equal to 16ms), and when code scanning is finished, the graphic data flow is closed so that a camera or a soft scanning wharf module enters a low power consumption state, and graphic data frames and low power consumption can be obtained in the fastest time on software by using the method before code scanning application is not quitted. And when the code scanning program is closed or the machine enters a dormant state, executing the action of closing the camera.
The above description is only a preferred embodiment of the present invention, and does not limit the present invention in any way. It will be understood by those skilled in the art that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (5)

1. A quick code scanning method for POS machine products is characterized by comprising the following steps:
step 1: starting code scanning equipment;
step 2: initializing a camera module; initializing a CMOS register and a focusing motor, and closing an image data stream to enter a low power consumption state during initialization;
and step 3: triggering code scanning; starting an image data stream to obtain an image;
and 4, step 4: adjusting exposure;
and 5: scanning a bar code;
step 6: finishing code scanning; closing the image data flow and entering a low power consumption mode; waiting for next trigger code scanning, executing the step 3 when the trigger is triggered, and executing the step 7 when the code scanning application is closed;
and 7: the code scanning application is closed.
2. The method of claim 1, wherein in step 1, the device for opening code scanning is: after the Android starts activity, the Camera module or the soft decoding head module is powered on when the resources are loaded.
3. The fast code scanning method for POS machine products as claimed in claim 1, wherein in step 2, initializing CMOS registers and focusing motors, and writing the initialization register list required by the corresponding CMOS model through I2C bus; the software closes the data flow of the image, at the moment, the chip enters a low power consumption state, and the working mode is configured into a mode of fixing the exposure time and the gain; the focus motor is set to a fixed focus mode.
4. The method of claim 1, wherein in step 3, the image data stream is started, and the data frame output by the chip is retrieved by a system callback and sent to the decoding library.
5. The method of claim 1, wherein in step 4, the adjusting exposure is: and adjusting the exposure parameters of the next frame (or N frames) of image according to the current image.
CN202011296083.5A 2020-11-18 2020-11-18 Quick code scanning method for POS machine product Active CN112489322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011296083.5A CN112489322B (en) 2020-11-18 2020-11-18 Quick code scanning method for POS machine product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011296083.5A CN112489322B (en) 2020-11-18 2020-11-18 Quick code scanning method for POS machine product

Publications (2)

Publication Number Publication Date
CN112489322A true CN112489322A (en) 2021-03-12
CN112489322B CN112489322B (en) 2022-11-22

Family

ID=74931864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011296083.5A Active CN112489322B (en) 2020-11-18 2020-11-18 Quick code scanning method for POS machine product

Country Status (1)

Country Link
CN (1) CN112489322B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542617A (en) * 2021-09-14 2021-10-22 北京紫光青藤微系统有限公司 Method and device for acquiring code scanning image, code scanning equipment and storage medium
CN113919382A (en) * 2021-04-29 2022-01-11 荣耀终端有限公司 Code scanning method and device
CN117725941A (en) * 2024-02-02 2024-03-19 荣耀终端有限公司 Code scanning method and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090088203A1 (en) * 2007-09-27 2009-04-02 Hand Held Products, Inc. Wireless bar code transaction device
CN105120112A (en) * 2015-09-25 2015-12-02 维沃移动通信有限公司 Camera starting method for mobile terminal and mobile terminal
CN105786487A (en) * 2016-01-29 2016-07-20 珠海汇迪科技有限公司 Method for start rapid previewing for automobile data recorder
US20160241784A1 (en) * 2015-02-12 2016-08-18 Samsung Electronics Co., Ltd. Method for controlling camera system, electronic device, and storage medium
CN108416239A (en) * 2018-01-31 2018-08-17 深圳盈达信息科技有限公司 A kind of bar code identifies the control method of engine and its reduction power consumption
CN109740393A (en) * 2018-12-06 2019-05-10 无锡盈达聚力科技有限公司 Bar code scanning system and method
CN110147688A (en) * 2019-04-02 2019-08-20 苏州摩比信通智能系统有限公司 The method and structure of power consumption when a kind of improvement barcode scanning equipment barcode scanning
CN110933289A (en) * 2018-09-20 2020-03-27 青岛海信移动通信技术股份有限公司 Continuous shooting method based on binocular camera, shooting device and terminal equipment
CN111460849A (en) * 2020-04-02 2020-07-28 福州符号信息科技有限公司 Method compatible with multiple sets of setting codes and code scanning equipment
CN111881698A (en) * 2020-06-11 2020-11-03 上海祥承通讯技术有限公司 Wharf scanning module multithreading code scanning processing method based on android system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090088203A1 (en) * 2007-09-27 2009-04-02 Hand Held Products, Inc. Wireless bar code transaction device
US20160241784A1 (en) * 2015-02-12 2016-08-18 Samsung Electronics Co., Ltd. Method for controlling camera system, electronic device, and storage medium
CN105120112A (en) * 2015-09-25 2015-12-02 维沃移动通信有限公司 Camera starting method for mobile terminal and mobile terminal
CN105786487A (en) * 2016-01-29 2016-07-20 珠海汇迪科技有限公司 Method for start rapid previewing for automobile data recorder
CN108416239A (en) * 2018-01-31 2018-08-17 深圳盈达信息科技有限公司 A kind of bar code identifies the control method of engine and its reduction power consumption
CN110933289A (en) * 2018-09-20 2020-03-27 青岛海信移动通信技术股份有限公司 Continuous shooting method based on binocular camera, shooting device and terminal equipment
CN109740393A (en) * 2018-12-06 2019-05-10 无锡盈达聚力科技有限公司 Bar code scanning system and method
CN110147688A (en) * 2019-04-02 2019-08-20 苏州摩比信通智能系统有限公司 The method and structure of power consumption when a kind of improvement barcode scanning equipment barcode scanning
CN111460849A (en) * 2020-04-02 2020-07-28 福州符号信息科技有限公司 Method compatible with multiple sets of setting codes and code scanning equipment
CN111881698A (en) * 2020-06-11 2020-11-03 上海祥承通讯技术有限公司 Wharf scanning module multithreading code scanning processing method based on android system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
熊远等: "基于I2C总线CMOS成像系统的设计与实现", 《影像技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919382A (en) * 2021-04-29 2022-01-11 荣耀终端有限公司 Code scanning method and device
CN113542617A (en) * 2021-09-14 2021-10-22 北京紫光青藤微系统有限公司 Method and device for acquiring code scanning image, code scanning equipment and storage medium
CN117725941A (en) * 2024-02-02 2024-03-19 荣耀终端有限公司 Code scanning method and electronic equipment

Also Published As

Publication number Publication date
CN112489322B (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN112489322B (en) Quick code scanning method for POS machine product
US10674088B2 (en) Method and device for acquiring image, terminal and computer-readable storage medium
US8117476B2 (en) Information processing apparatus, startup method and computer program
WO2019179283A1 (en) Image recognition method and device
KR101245485B1 (en) Methods, computer program products and apparatus providing improved image capturing
US10338976B2 (en) Method and apparatus for providing screenshot service on terminal device and storage medium and device
CN112291475B (en) Photographing method and device and electronic equipment
CN112954212B (en) Video generation method, device and equipment
CN113596294A (en) Shooting method and device and electronic equipment
CN105578295A (en) Video playing control method and equipment thereof
CN112333385B (en) Electronic anti-shake control method and device
US20060152595A1 (en) Method for capturing of real-time image
US20070236593A1 (en) Image capturing appatatus and method for use in a mobil terminal
CN110557417A (en) Image processing method and device and storage medium
CN110012235B (en) Imaging exposure control method and device, computer readable storage medium and system
CN115065767A (en) Antenna power adjusting method and electronic equipment thereof
CN109120929B (en) Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system
CN109005455B (en) Video data processing method and device
US9594422B2 (en) Terminal apparatus and method for controlling thereof
US20230386483A1 (en) Method and apparatus for audio processing, electronic device and storage medium
US11334369B2 (en) Application launching method and device
CN114299014A (en) Image processing architecture, method, electronic device and storage medium
WO2018121542A1 (en) Operation method and apparatus for service object, and electronic device
CN112738398B (en) Image anti-shake method and device and electronic equipment
CN112887515B (en) Video generation method and device

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