Disclosure of Invention
The embodiment of the invention provides a method and a device for identifying and reading a plurality of tripod nine-code pictures and a mobile terminal, which are used for solving the problem of low efficiency in identifying and reading the plurality of tripod nine-code pictures in the prior art. The specific technical scheme is as follows:
the embodiment of the invention provides a method for recognizing and reading a tripod nine code, which is applied to a mobile terminal, and comprises the following steps:
after determining that the tripod nine-code reading needs to be started, invoking a camera of the mobile terminal to scan the tripod nine-code map;
displaying a scanning page with a scanning frame;
under the condition that the camera is kept to continuously scan the tripod nine-code image, after scanning the tripod nine-code image each time and obtaining a scanning image, reading tripod nine-code information represented by the tripod nine-code image of the scanning from the scanning image;
and displaying the tripod nine-code information which is read out in the scanning page with the scanning frame.
Further, the step of reading the information of the tripod nine codes represented by the tripod nine code patterns scanned for the time from the scanned image includes:
performing binarization processing on the scanned image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, after scanning the tripod nine-code image each time and obtaining a scanned image, the tripod nine-code information represented by the tripod nine-code image scanned each time is read from the scanned image, including:
after scanning the tripod nine-code image each time and obtaining a scanning image, storing the scanning image obtained by scanning into an image queue;
extracting scanning images from the image queue according to the sequence from the first to the last of the preservation time;
binarizing the extracted scanning image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, the displaying the identified and read-out nine-code information in the scan page with the scan frame includes:
and displaying the tripod nine-code information read out by the current identification on the basis of keeping the tripod nine-code information of the tripod nine-code map read out by the previous identification in the scanning page with the scanning frame.
Further, after receiving the input stopping reading operation, stopping calling the camera to scan the tripod nine-code image.
The embodiment of the invention also provides a device for recognizing the tripod nine codes, which is applied to the mobile terminal and comprises the following steps:
the calling module is used for calling the camera of the mobile terminal to scan the tripod nine-code pattern after determining that the tripod nine-code reading needs to be started;
the display module is used for displaying the scanning page with the scanning frame;
the identifying and reading module is used for identifying and reading the tripod nine-code information represented by the tripod nine-code image scanned for the time from the scanning image after scanning the tripod nine-code image each time and obtaining the scanning image under the condition that the camera is kept to continuously scan the tripod nine-code image;
and the display module is used for displaying the tripod nine-code information read out in the scanning page with the scanning frame.
Further, the reading module is specifically configured to:
performing binarization processing on the scanned image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, the reading module is specifically configured to:
after scanning the tripod nine-code image each time and obtaining a scanning image, storing the scanning image obtained by scanning into an image queue;
extracting scanned images from the image queue according to the sequence of the preservation time from the beginning to the end:
binarizing the extracted scanning image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, the display module is specifically configured to:
and displaying the tripod nine-code information read out by the current identification on the basis of keeping the tripod nine-code information of the tripod nine-code map read out by the previous identification in the scanning page with the scanning frame.
Further, the calling module is further configured to:
and after receiving the input recognition stopping operation, stopping calling the camera to scan the tripod nine-code pattern.
The embodiment of the invention also provides a mobile terminal which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface, and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the step of any Ding nine code reading method when executing the program stored in the memory.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program realizes the steps of any Ding Jiu code reading method when being executed by a processor.
The embodiment of the invention also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute any of the ding nine code reading methods.
The embodiment of the invention has the beneficial effects that:
the method for identifying and reading the tripod nine-code is applied to a mobile terminal, firstly, after the tripod nine-code identification needs to be started, a camera of the mobile terminal is called to scan the tripod nine-code image, a scanning page with a scanning frame is displayed, then under the condition that the camera is kept to continuously scan the tripod nine-code image, after the tripod nine-code image is scanned each time and a scanning image is obtained, tripod nine-code information represented by the tripod nine-code image of the scanning is identified and read from the scanning image, and finally, the tripod nine-code information which is read is displayed in the scanning page with the scanning frame. By adopting the tripod nine-code reading method provided by the embodiment of the invention, when a plurality of tripod nine-code pictures are required to be read, the tripod nine-code information of the tripod nine-code pictures can be displayed in sequence in a scanning page with a scanning frame only by calling the camera once, so that the workload of a user is reduced and the efficiency is improved.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. 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.
The following first describes a method for identifying and reading the tripod nine codes provided by the embodiment of the invention in detail.
Referring to fig. 1, fig. 1 is a flow chart of a method for identifying and reading a tripod nine code according to an embodiment of the present invention, which may include the following steps:
and step 101, after determining that the ding nine-code reading needs to be started, calling a camera of the mobile terminal to scan the ding nine-code map.
Specifically, after the operation of starting the ding nine-code reading is detected, the starting of the ding nine-code reading can be determined, for example, a ding nine-code reading starting button is displayed on an interface of the mobile terminal, after the button is detected to be triggered by a user, the starting of the ding nine-code reading is determined, and then a camera of the mobile terminal is called to scan the ding nine-code map.
In the embodiment of the invention, before the Ding nine code reading is started, the camera parameters of the camera of the mobile terminal can be set according to the actual application requirements, for example, the camera parameters such as resolution, picture format, camera mode and the like are set.
Step 102, displaying a scan page with a scan frame.
As shown in fig. 2, a schematic diagram of a scan page with a scan frame according to an embodiment of the present invention is shown, the scan frame 202 is included in the scan page 201 and is located at the upper half of the scan page 201, and when the tripod nine code patterns are located in the scan frame 202, the tripod nine code information that is read out can be displayed in the information display area 203.
Step 103, under the condition that the camera is kept to continuously scan the tripod nine-code image, after scanning the tripod nine-code image each time and obtaining a scanned image, the tripod nine-code information represented by the tripod nine-code image of the scanning is read from the scanned image.
In this step, after the camera of the mobile terminal is called once to scan the tripod nine-code patterns, a plurality of tripod nine-code patterns can be continuously scanned, and after each time of scanning the tripod nine-code patterns, the tripod nine-code information represented by the tripod nine-code patterns is read.
That is, the camera of the mobile terminal is called to scan the tripod nine-code image, and after the tripod nine-code image is scanned, the camera is not immediately stopped from being called to scan the tripod nine-code image, but is kept to continuously scan the tripod nine-code image, so that a plurality of tripod nine-code images can be scanned after the camera is called once.
Further, in one embodiment, in this step, the step of reading the information of the ding jiu code represented by the ding jiu code map of the scanning may be specifically performed as follows:
binarizing the scanned image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, in another embodiment, after scanning the tripod nine code pattern and obtaining the scanned image in this step, the tripod nine code information represented by the tripod nine code pattern scanned in this time is read from the scanned image, which may be executed in the following manner:
after scanning the tripod nine-code image each time and obtaining a scanning image, storing the scanning image obtained by scanning into an image queue;
extracting scanning images from the image queue according to the sequence from the first to the last of the preservation time;
binarizing the extracted scanning image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
And 104, displaying the identified and read tripod nine-code information in a scanning page with a scanning frame.
As shown in fig. 3, a schematic diagram of a scanned page displaying the information of the tripod nine codes according to an embodiment of the present invention is substantially the same as the scanned page in fig. 2, and the information display area 303 displaying the information of the tripod nine codes is highlighted.
In this step, specifically, the information of the tripod nine code read out at this time may be displayed on the basis of keeping the information of the tripod nine code read out before being displayed in the scan page with the scan frame.
For example, the ding nine-code information may be displayed in the information display area 303 in a list manner.
Moreover, a delete button 304 may be disposed beside the ding nine-code information, so that when the displayed ding nine-code information is repeated, the user may perform delete operation by triggering the delete button 304; when the displayed tripod nine-code information is large in amount, the user can also display the hidden tripod nine-code information in the information display area 303 through a sliding operation.
And 105, stopping calling the camera to scan the tripod nine-code pattern after receiving the input reading stopping operation.
Specifically, after the operation of starting and stopping reading is detected, it may be determined that the camera needs to be stopped to be invoked for scanning the tripod nine-code image, for example, a user may end scanning the current tripod nine-code image by triggering a stop reading button in a scanning page.
By adopting the tripod nine-code reading method shown in the figure 1, when a plurality of tripod nine-code pictures are required to be read, the tripod nine-code information of the tripod nine-code pictures can be sequentially displayed in a scanning page with a scanning frame only by calling the camera once, so that the workload of a user is reduced and the efficiency is improved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a tripod nine-code reading device according to an embodiment of the present invention, corresponding to the flow shown in fig. 1, the device may include:
the calling module 401 is configured to call a camera of the mobile terminal to scan the ding nine-code pattern after determining that the ding nine-code reading needs to be started;
a display module 402, configured to display a scan page with a scan frame;
the reading module 403 is configured to, under the condition that the camera is kept continuously performing the scanning of the tripod nine-code image, read tripod nine-code information represented by the tripod nine-code image scanned for the time from the scanned image after scanning the tripod nine-code image each time and obtaining the scanned image;
and the display module 404 is used for displaying the information of the ancient cooking vessel nine codes read out in the scanning page with the scanning frame.
Further, the identifying and reading module 403 is specifically configured to:
binarizing the scanned image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, the identifying and reading module 403 is specifically configured to:
after scanning the tripod nine-code image each time and obtaining a scanning image, storing the scanning image obtained by scanning into an image queue;
extracting scanned images from the image queue according to the sequence of the preservation time from the beginning to the end:
binarizing the extracted scanning image to obtain binarized frame image data;
and decoding the frame image data to obtain the tripod nine-code information represented by the tripod nine-code image of the scanning.
Further, the display module 404 is specifically configured to:
and displaying the tripod nine-code information read out by the current identification on the basis of keeping the tripod nine-code information of the tripod nine-code map read out by the previous identification in a scanning page with a scanning frame.
Further, the calling module 401 is further configured to:
and after receiving the input recognition stopping operation, stopping calling the camera to scan the tripod nine-code pattern.
The embodiment of the invention also provides a mobile terminal, as shown in fig. 5, which comprises a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete the communication with each other through the communication bus 504;
a memory 503 for storing a computer program;
the processor 501 is configured to execute the program stored in the memory 503, and implement the following steps:
after determining that the tripod nine-code reading needs to be started, calling a camera of the mobile terminal to scan the tripod nine-code map;
displaying a scanning page with a scanning frame;
under the condition that the camera is kept to continuously scan the tripod nine-code image, after scanning the tripod nine-code image each time and obtaining a scanning image, reading tripod nine-code information represented by the tripod nine-code image scanned the time from the scanning image;
and displaying the information of the ancient cooking vessel nine codes read out in a scanning page with a scanning frame.
The communication bus mentioned by the mobile terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which a computer program is stored, and the computer program when executed by a processor implements the steps of any of the above-mentioned ding jiu code recognition methods.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the above-described methods of identifying code of the present invention is also provided.
By adopting the method, the device and the mobile terminal for identifying and reading the tripod nine-code patterns, when the tripod nine-code patterns are required to be identified and read, the tripod nine-code information of the tripod nine-code patterns can be sequentially displayed in the scanning page with the scanning frame only by calling the camera once, so that the workload of a user is reduced, and the efficiency is improved.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus and mobile terminal embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only required.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.