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

Quick code scanning method for POS machine product Download PDF

Info

Publication number
CN112489322B
CN112489322B CN202011296083.5A CN202011296083A CN112489322B CN 112489322 B CN112489322 B CN 112489322B CN 202011296083 A CN202011296083 A CN 202011296083A CN 112489322 B CN112489322 B CN 112489322B
Authority
CN
China
Prior art keywords
code scanning
power consumption
camera
scanning
data stream
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
CN202011296083.5A
Other languages
Chinese (zh)
Other versions
CN112489322A (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)
  • Studio Devices (AREA)
  • Cash Registers Or Receiving Machines (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 port before the 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 a data stream 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 code scanning by using PDA and POS at high frequency such as express storage logistics, namely, the trend of scanning in a point-to-point manner is shown. 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 clear text specified execution sequence, and the design of the ring-and-ring buckling is originally designed to realize the photographing/recording function of a mobile phone more easily, so that the developers can develop application programs without knowing specific bottom logic, but the frame of the scanning code product is extremely bloated, and cannot meet the use requirement of a target scene on the scanning codes.
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, for POS products using 13M,5M,1M pixel cameras as an example, the time from clicking a code scanning key to taking a first frame is about 300ms, and the whole process is about 400ms when an automatic exposure algorithm of a chip adjusts frame data which can be successfully decoded frame by frame, and the time for completing one code scanning action is about 500 ms. The scheme is matched with an algorithm with a poor decoding effect or a product with a low camera frame rate, so that a longer time can be obtained, an obvious pause phenomenon can appear in the use process of a high-frequency scene, and 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;
and 2, step: 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; opening an image data stream to obtain an image;
and 4, step 4: adjusting exposure;
and 5: scanning a bar code;
and 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 the activity, the Camera module or the soft decoding head module is powered on when the resource is 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 exposure time and 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 port before the 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 a data stream 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, the state of the chip before code scanning is not triggered can not cause extra power consumption, when code scanning action is triggered externally, the data stream of the camera is opened, the time from pressing a key to obtaining a first frame at this time is approximately equal to the frame rate of the chip (30 frames are output and is approximately equal to 33ms, and 60 frames are output and is approximately equal to 16 ms), when code scanning is finished, the graphic data stream is closed so that the camera or the soft scanning wharf module enters a low power consumption state, and the method can realize that graphic data frames and low power consumption can be obtained in the fastest time on software before code scanning application is not quitted. And when the code scanning program is closed or the machine enters a dormant state, the action of closing the camera is executed.
According to the code scanning method, when code scanning is triggered, the action of starting a camera is not needed, and image data can be obtained only by starting an image data stream, so that the time for obtaining an image is greatly reduced; the CMOS chip is adjusted timely and accurately, 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 in 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.
And 2, step: initializing a camera module; initializing a camera module: initializing a CMOS register and a focusing 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 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 with the loading of resources and configuration in the self-starting process of code scanning application, the state of the chip before code scanning is not triggered can not cause extra power consumption, when code scanning action is triggered externally, the data stream of the camera is opened, the time from pressing a key to obtaining a first frame at this time is approximately equal to the frame rate of the chip (30 frames are output and is approximately equal to 33ms, and 60 frames are output and is approximately equal to 16 ms), when code scanning is finished, the graphic data stream is closed so that the camera or the soft scanning wharf module enters a low power consumption state, and the method can realize that graphic data frames and low power consumption can be obtained in the fastest time on software 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 (1)

1. A quick code scanning method for POS machine products is characterized by comprising the following steps:
step 1: starting code scanning equipment;
the opening code scanning device comprises: after the Android starts activity, the Camera module or the soft decoding head module is powered on when resources are loaded;
and 2, step: 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;
initializing a CMOS register and a focusing 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 exposure time and gain; the focusing motor is set to be in a fixed focus mode;
and step 3: triggering code scanning; starting an image data stream to obtain an image;
starting image data flow, and sending data frames output by the acquisition chip into a decoding library through system callback;
and 4, step 4: adjusting exposure;
the adjusted exposure is: adjusting the exposure parameters of the next frame or N frames of images according to the current image, wherein N is more than or equal to 2;
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.
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 CN112489322A (en) 2021-03-12
CN112489322B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919382B (en) * 2021-04-29 2023-04-28 荣耀终端有限公司 Code scanning method and device
CN113542617B (en) * 2021-09-14 2021-12-28 北京紫光青藤微系统有限公司 Method and device for acquiring code scanning image, code scanning equipment and storage medium
CN117725941B (en) * 2024-02-02 2024-06-25 荣耀终端有限公司 Code scanning method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN111460849A (en) * 2020-04-02 2020-07-28 福州符号信息科技有限公司 Method compatible with multiple sets of setting codes and code scanning equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7946493B2 (en) * 2007-09-27 2011-05-24 Hand Held Products, Inc. Wireless bar code transaction device
EP3057309B1 (en) * 2015-02-12 2020-10-21 Samsung Electronics Co., Ltd. Method for controlling camera system, electronic device, and storage medium
CN108416239B (en) * 2018-01-31 2019-10-11 深圳盈达信息科技有限公司 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
CN111881698A (en) * 2020-06-11 2020-11-03 上海祥承通讯技术有限公司 Wharf scanning module multithreading code scanning processing method based on android system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN111460849A (en) * 2020-04-02 2020-07-28 福州符号信息科技有限公司 Method compatible with multiple sets of setting codes and code scanning equipment

Also Published As

Publication number Publication date
CN112489322A (en) 2021-03-12

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
US11087105B1 (en) Performance improvements for recognition of optical patterns in images
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
JP2020527000A (en) Shooting mobile terminal
US20170147053A1 (en) Application driven dynamic voltage and frequency scaling method and associated machine readable medium
CN113596294A (en) Shooting method and device and electronic equipment
CN107615745A (en) A kind of photographic method and terminal
CN112333385B (en) Electronic anti-shake control method and device
CN110557417B (en) Image processing method and device and storage medium
CN112291475A (en) Photographing method and device and electronic equipment
CN115065767B (en) Antenna power adjusting method and electronic equipment thereof
US11803719B1 (en) Performance improvements for recognition of optical patterns in images using incremental magnification
US20070236593A1 (en) Image capturing appatatus and method for use in a mobil terminal
CN110012235B (en) Imaging exposure control method and device, computer readable storage medium and system
JP2024519894A (en) Image processing method, device, equipment, and storage medium
US10769416B2 (en) Image processing method, electronic device and storage medium
CN109120929B (en) Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and video encoding system
CN112954212B (en) Video generation method, device and equipment
US9594422B2 (en) Terminal apparatus and method for controlling thereof
US11334369B2 (en) Application launching method and device
US20220301278A1 (en) Image processing method and apparatus, storage medium, and electronic device
CN114299014A (en) Image processing architecture, method, electronic device and storage medium

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