Nothing Special   »   [go: up one dir, main page]

CN110798608B - Method and device for identifying image - Google Patents

Method and device for identifying image Download PDF

Info

Publication number
CN110798608B
CN110798608B CN201810870101.2A CN201810870101A CN110798608B CN 110798608 B CN110798608 B CN 110798608B CN 201810870101 A CN201810870101 A CN 201810870101A CN 110798608 B CN110798608 B CN 110798608B
Authority
CN
China
Prior art keywords
focal length
length value
value
scene
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
CN201810870101.2A
Other languages
Chinese (zh)
Other versions
CN110798608A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810870101.2A priority Critical patent/CN110798608B/en
Publication of CN110798608A publication Critical patent/CN110798608A/en
Application granted granted Critical
Publication of CN110798608B publication Critical patent/CN110798608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a method and a device for identifying an image, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a focal length parameter; and adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified. The embodiment can complete the recognition of the image without complete focusing, and can improve the recognition efficiency to a certain extent.

Description

Method and device for identifying image
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for recognizing an image.
Background
The bar code (one-dimensional code, two-dimensional code and the like) is used as a tool for bearing information, has the advantages of strong universality, easiness in generation and identification and the like, and is an important information interaction means. In the existing barcode identification technology, focusing of an image to be identified is completed by a camera, and then a barcode in a current image acquired by the camera is identified.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the image needs to be identified after the focusing is completely finished, so that the times of focal length adjustment are increased; the focus adjustment range is a fixed value, each focusing needs to consume a long time, and a large amount of time is wasted in a high-frequency use scene.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for recognizing an image, which can improve efficiency of image recognition, especially barcode image recognition.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of recognizing an image, including:
acquiring a focal length parameter;
and adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified.
In the embodiment, image recognition is performed once after the focal length is adjusted each time until the image is successfully recognized. Therefore, the image can be recognized without complete focusing, and the recognition efficiency can be improved to a certain extent.
Optionally, the focus parameter includes an initial focus value and an end focus value; the step of adjusting the focal length of the image acquisition device based on the focal length parameter comprises:
setting the current focal length of the image acquisition equipment as an initial focal length value;
if the image is not successfully identified, a change quantity is superposed on the current focal length of the image acquisition equipment so that the current focal length value tends to change towards the termination focal length value.
Optionally, the method further includes:
recording the current focal length when the user successfully identifies the image content as a sample focal length value;
selecting the minimum value from the sample focal length values as the minimum focal length value of the user, and selecting the maximum value as the maximum focal length value of the user;
and acquiring minimum focal length values and maximum focal length values of a plurality of users, taking the median of each minimum focal length value as an initial focal length value, and taking the median of each maximum focal length value as a termination focal length value.
In this embodiment, the focal length when each user successfully identifies the image content is used as a sample focal length value, and the sample focal length values of a plurality of users are processed by using a statistical method, so as to obtain more reasonable focal length adjustment ranges (an initial (minimum) focal length value and a final (maximum) focal length value). The focal length adjustment times are further reduced, and the image recognition efficiency is improved.
Optionally, the focus parameter further includes scene identifiers, where each scene identifier corresponds to a set of initial focus values and end focus values; the step of obtaining the focal length parameter comprises:
determining a current scene identifier according to a current using scene of the image acquisition equipment, and acquiring an initial focal length value and a final focal length value corresponding to the current scene identifier.
Optionally, the method further includes:
recording the current focal length when the user successfully identifies the image content as a sample focal length value, and determining a scene identifier of the sample focal length value according to a use scene when the user successfully identifies the image content;
classifying the focus values of the samples according to the scene identifications, respectively selecting a minimum value from all the categories as a minimum focus value of the user corresponding to each scene identification, and selecting a maximum value from all the categories as a maximum focus value of the user corresponding to each scene identification;
the minimum focal length value and the maximum focal length value of each scene identification corresponding to a plurality of users are obtained, the median of each minimum focal length value corresponding to the scene identification is used as the initial focal length value corresponding to the scene identification, and the median of each maximum focal length value corresponding to the scene identification is used as the final focal length value corresponding to the scene identification.
In the embodiment, on the basis of the previous embodiment, the feature of scene identification is added, so that the scenes are used as the classification standard of the focal length adjustment range, and different scenes correspond to different ranges, so that the method has better adaptability and better use effect under the condition of multi-operation scene switching.
To achieve the above object, according to another aspect of embodiments of the present invention, there is provided an apparatus for recognizing an image, including:
the parameter processing module is used for acquiring the focal length parameter;
and the identification module is used for adjusting the focal length of the image acquisition equipment based on the focal length parameter, and identifying the current image acquired by the image acquisition equipment after each adjustment until the image content is successfully identified.
Optionally, the focus parameter includes an initial focus value and an end focus value; the identification module is further configured to:
setting the current focal length of the image acquisition equipment as an initial focal length value;
if the image is not successfully identified, a change quantity is superposed on the current focal length of the image acquisition equipment so that the current focal length value tends to change towards the termination focal length value.
Optionally, the parameter processing module is further configured to:
recording the current focal length when the user successfully identifies the image content as a sample focal length value;
selecting the minimum value from the sample focal length values as the minimum focal length value of the user, and selecting the maximum value as the maximum focal length value of the user;
and acquiring minimum focal length values and maximum focal length values of a plurality of users, taking the median of each minimum focal length value as an initial focal length value, and taking the median of each maximum focal length value as a termination focal length value.
Optionally, the focus parameter further includes scene identifiers, and each scene identifier corresponds to a set of initial focus values and end focus values; the parameter processing module is further configured to:
determining a current scene identifier according to a current using scene of the image acquisition equipment, and acquiring an initial focal length value and a final focal length value corresponding to the current scene identifier.
Optionally, the parameter processing module is further configured to:
recording the current focal length when the user successfully identifies the image content as a sample focal length value, and determining a scene identifier of the sample focal length value according to a use scene when the user successfully identifies the image content;
classifying the focal length values of the samples according to the scene identifications, respectively selecting a minimum value from all the categories as a minimum focal length value of the user corresponding to each scene identification, and selecting a maximum value from all the categories as a maximum focal length value of the user corresponding to each scene identification;
the minimum focal length value and the maximum focal length value of each scene identification corresponding to a plurality of users are obtained, the median of each minimum focal length value corresponding to the scene identification is used as the initial focal length value corresponding to the scene identification, and the median of each maximum focal length value corresponding to the scene identification is used as the final focal length value corresponding to the scene identification.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic device for recognizing an image, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to perform at least the following:
acquiring a focal length parameter;
and adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program, when executed by a processor, at least realizing:
acquiring a focal length parameter;
and adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of identifying an image according to an embodiment of the invention;
FIG. 2 is a schematic diagram of the main steps of a method of identifying an image according to another embodiment of the invention;
FIG. 3 is a schematic diagram of the main steps of a method of identifying an image according to yet another embodiment of the present invention;
FIG. 4 is a schematic diagram of the main blocks of an apparatus for recognizing an image according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a method of recognizing an image according to an embodiment of the present invention. As shown in fig. 1, a method for recognizing an image according to an embodiment of the present invention includes:
and S101, acquiring a focal length parameter. The focal length parameter in the embodiment is not a default value, but a statistical value obtained by collecting the focal length value of each user when the user successfully identifies the image in the past and calculating, so that compared with the default value, the focal length parameter in the invention can be closer to the focal length in the scene commonly used by the user, thereby reducing the time consumed by focusing. The statistical value can be a fixed value obtained by calculation according to focal length data obtained in advance when the image is successfully identified in a specific use scene; in addition, the focal length parameter may be a value updated in real time according to the acquired data during the use process of the user, and the calculation method will be described in the following embodiments.
S102, adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified. The image acquisition equipment mainly refers to a camera lens and can also be equipment with other adjustable focal lengths and used for acquiring images.
For image recognition technology, it is not necessary that full focusing is successful to recognize the content of an image; for example, for barcode identification, as long as the width of each barcode can be distinguished, the information contained in the barcode can be identified, and a cleaned barcode profile does not need to be acquired; for example, for color recognition, it is not necessary to acquire a clear image, and each color patch may be distinguished. The present embodiment applies the above principle, and identifies the acquired current image after adjusting the focal length each time until the identification is successful. Thus, the number of times of focal length adjustment can be effectively reduced, thereby shortening the overall time consumption of image recognition.
Fig. 2 is a schematic diagram of main steps of a method of recognizing an image according to another embodiment of the present invention.
As shown, in some optional embodiments, the focus parameter includes an initial focus value and an end focus value; the method for recognizing the image comprises the following steps:
s201, acquiring an initial focal length value and a final focal length value. The initial focal length value is the first focal length used when the image acquisition equipment acquires the image, and the final focal length value is the last focal length used when the image acquisition equipment acquires the image; both defining the focus adjustment range of the image acquisition device.
S202, setting the current focal length of the image acquisition equipment as an initial focal length value.
S203, identifying the current image acquired by the image acquisition equipment. If the current image is not successfully identified, go to step S204; if the current image is successfully identified, go to step S205.
S204, superposing a change quantity on the current focal length of the image acquisition equipment so as to enable the current focal length value to tend to change towards the termination focal length value; go to step S203.
It should be noted that the initial focal length value may be a smaller value or a larger value relative to the end focal length value, and when the initial focal length value is a smaller value, the change amount is a positive number, otherwise, the change amount is a negative number. The magnitude of the change determines the time consumption and the precision of the focal length adjustment, and can be determined according to a specific use scene to obtain the balance between the speed and the precision. In contrast, since full focusing is not required, the amount of change may be slightly larger than the default value of the single focus change amount of the image pickup device when adjusting the focus.
And S205, completing image recognition.
Specifically, the initial focal length value and the final focal length value in the present embodiment are generated by the following steps:
recording the current focal length when the user successfully identifies the image content as a sample focal length value;
selecting the minimum value from the sample focal length values as the minimum focal length value of the user, and selecting the maximum value as the maximum focal length value of the user;
and acquiring minimum focal length values and maximum focal length values of a plurality of users, taking the median of each minimum focal length value as an initial focal length value, and taking the median of each maximum focal length value as a termination focal length value. It should be noted that, the minimum focal length value may also be used as the end focal length value, and the maximum focal length value may also be used as the initial focal length value, at which time the positive or negative of the change amount should be adaptively adjusted.
In addition, it should be understood that the selected users in this embodiment should have the same or similar usage scenarios. For example, the focal lengths of the users in the daily use environment or the staff in the same position on the production line are different from each other less when the users successfully recognize the image, so that a smaller focal length adjustment range can be defined to improve the efficiency of image recognition.
Fig. 3 is a schematic diagram of main steps of a method of recognizing an image according to still another embodiment of the present invention.
In the former embodiment, when determining the initial and final focal length values, the users who need to provide sample data are in the same or similar use scenarios, which limits the application scope of the embodiment to some extent. As an improvement, the focal length parameter in this embodiment further includes scene identifiers, and each scene identifier corresponds to a set of initial focal length value and end focal length value respectively; as shown in fig. 3, the present embodiment includes:
s301, determining a current scene identifier according to a current using scene of the image acquisition device, and acquiring an initial focal length value and a final focal length value corresponding to the current scene identifier.
And S302, setting the current focal length of the image acquisition equipment as an initial focal length value.
S303, identifying the current image acquired by the image acquisition equipment. If the current image is not successfully identified, go to step S304; if the current image is successfully identified, go to step S305.
S304, superposing a variable to the current focal length of the image acquisition equipment so as to enable the current focal length value to tend to change towards the termination focal length value; go to step S303.
S305, completing the image recognition.
Specifically, the initial focal length value and the final focal length value in the present embodiment are generated by the following steps:
recording the current focal length when the user successfully identifies the image content as a sample focal length value, and determining a scene identifier of the sample focal length value according to a use scene when the user successfully identifies the image content;
classifying the focal length values of the samples according to the scene identifications, respectively selecting a minimum value from all the categories as a minimum focal length value of the user corresponding to each scene identification, and selecting a maximum value from all the categories as a maximum focal length value of the user corresponding to each scene identification;
the minimum focal length value and the maximum focal length value of each scene identification corresponding to a plurality of users are obtained, the median of each minimum focal length value corresponding to the scene identification is used as the initial focal length value corresponding to the scene identification, and the median of each maximum focal length value corresponding to the scene identification is used as the final focal length value corresponding to the scene identification.
The scene identifier is used for marking a use scene of a user, for example, a user in a certain preset area can be divided into a specific scene identifier by a way of defining a coordinate range; or, according to the image recognition task currently performed by the user, dividing the user performing the same or similar image recognition task into a specific scene identifier. Compared with the previous embodiment, the embodiment can further refine the statistical ranges of the initial focal length value and the termination focal length value according to the use scene of the user, thereby improving the adaptability of the method to different use scenes and expanding the application range of the method.
Fig. 4 is a schematic diagram of main blocks of an apparatus for recognizing an image according to an embodiment of the present invention.
As shown in fig. 4, according to another embodiment of the present invention, there is also provided an apparatus 400 for recognizing an image, including:
a parameter processing module 401, configured to obtain a focal length parameter;
an identifying module 402, configured to adjust a focal length of the image capturing device based on the focal length parameter, and after each adjustment, identify a current image captured by the image capturing device until image content is successfully identified.
Specifically, the focal length parameter includes an initial focal length value and a termination focal length value; the identification module 402 is further configured to:
setting the current focal length of the image acquisition equipment as an initial focal length value;
if the image is not successfully identified, a change quantity is superposed on the current focal length of the image acquisition equipment so that the current focal length value tends to change towards the termination focal length value.
In a specific embodiment, the parameter processing module 401 is further configured to:
recording the current focal length when the user successfully identifies the image content as a sample focal length value;
selecting the minimum value from the sample focal length values as the minimum focal length value of the user, and selecting the maximum value as the maximum focal length value of the user;
and acquiring minimum focal length values and maximum focal length values of a plurality of users, taking the median of each minimum focal length value as an initial focal length value, and taking the median of each maximum focal length value as a termination focal length value.
In another embodiment, the focus parameters further include scene identifications, each scene identification corresponding to a set of initial focus values and end focus values; the parameter processing module 401 is further configured to:
determining a current scene identifier according to a current using scene of the image acquisition equipment, and acquiring an initial focal length value and a final focal length value corresponding to the current scene identifier.
Specifically, in this embodiment, the parameter processing module 401 is further configured to:
recording the current focal length when the user successfully identifies the image content as a sample focal length value, and determining a scene identifier of the sample focal length value according to a use scene when the user successfully identifies the image content;
classifying the focal length values of the samples according to the scene identifications, respectively selecting a minimum value from all the categories as a minimum focal length value of the user corresponding to each scene identification, and selecting a maximum value from all the categories as a maximum focal length value of the user corresponding to each scene identification;
the minimum focal length value and the maximum focal length value of each scene identification corresponding to a plurality of users are obtained, the median of each minimum focal length value corresponding to the scene identification is used as the initial focal length value corresponding to the scene identification, and the median of each maximum focal length value corresponding to the scene identification is used as the final focal length value corresponding to the scene identification.
Fig. 5 illustrates an exemplary system architecture 500 to which the method of recognizing an image or the apparatus for recognizing an image of the embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 is the medium used to provide communication links between terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. In particular, these terminal devices should be provided with an image capturing device (or module), or may be connected to an external image capturing device (or module) to obtain the function of capturing an image.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503.
It should be noted that, the method for recognizing an image provided by the embodiment of the present invention generally includes the steps of generally using the terminal devices 501, 502, 503, and accordingly, the apparatus for recognizing an image generally uses the terminal devices 501, 502, 503; it should be understood that the calculation steps in this embodiment and with respect to the focal length parameter may also be processed by the server 505, and the terminal devices 501, 502, 503 are only used for sending sample data and receiving the calculation results of the focal length parameter.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a readable storage medium according to the embodiment of the invention.
Fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the present invention.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, the processes described above in the schematic representation of the main steps may be implemented as computer software programs according to embodiments of the present invention. For example, an embodiment of the invention comprises a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the method illustrated in the schematic diagram of the main steps. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a parameter processing module and an identification module. The names of these modules do not limit the modules themselves in some cases, for example, the identification module may also be described as a "module for adjusting the focal length of the image capturing device based on the focal length parameter, and after each adjustment, identifying the current image captured by the image capturing device until the image content is successfully identified".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring a focal length parameter;
and adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified.
According to the technical scheme of the embodiment of the invention, the image recognition is carried out once after the focal length is adjusted every time until the image is successfully recognized. Therefore, the image can be recognized without complete focusing, and the recognition efficiency can be improved to a certain extent.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method of recognizing an image, comprising:
acquiring a focal length parameter; the focal length parameter comprises an initial focal length value and an end focal length value; recording the current focal length when the user successfully identifies the image content as a sample focal length value; selecting the minimum value from the sample focal length values as the minimum focal length value of the user, and selecting the maximum value as the maximum focal length value of the user; acquiring minimum focal length values and maximum focal length values of a plurality of users, taking the median of each minimum focal length value as an initial focal length value and the median of each maximum focal length value as a termination focal length value, or taking the median of each minimum focal length value as a termination focal length value and the median of each maximum focal length value as an initial focal length value;
adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, identifying the current image acquired by the image acquisition equipment until the image content is successfully identified; wherein the step of adjusting the focal length of the image acquisition device based on the focal length parameter comprises: setting the current focal length of the image acquisition equipment as an initial focal length value; if the image is not successfully identified, a change quantity is superposed on the current focal length of the image acquisition equipment so that the current focal length value tends to change towards the termination focal length value.
2. The method of claim 1, wherein the focus parameters further comprise scene identifications, each scene identification corresponding to a set of initial focus values and end focus values; the step of obtaining the focal length parameter comprises:
determining a current scene identifier according to a current using scene of the image acquisition equipment, and acquiring an initial focal length value and a final focal length value corresponding to the current scene identifier.
3. The method of claim 2, further comprising:
recording the current focal length when the user successfully identifies the image content as a sample focal length value, and determining a scene identifier of the sample focal length value according to a use scene when the user successfully identifies the image content;
classifying the focal length values of the samples according to the scene identifications, respectively selecting a minimum value from all the categories as a minimum focal length value of the user corresponding to each scene identification, and selecting a maximum value from all the categories as a maximum focal length value of the user corresponding to each scene identification;
the minimum focal length value and the maximum focal length value of each scene identification corresponding to a plurality of users are obtained, the median of each minimum focal length value corresponding to the scene identification is used as the initial focal length value corresponding to the scene identification, and the median of each maximum focal length value corresponding to the scene identification is used as the final focal length value corresponding to the scene identification.
4. An apparatus for recognizing an image, comprising:
the parameter processing module is used for acquiring focal length parameters; the focal length parameter comprises an initial focal length value and an end focal length value; recording the current focal length when the user successfully identifies the image content as a sample focal length value; selecting the minimum value from the sample focal length values as the minimum focal length value of the user, and selecting the maximum value as the maximum focal length value of the user; acquiring minimum focal length values and maximum focal length values of a plurality of users, taking the median of each minimum focal length value as an initial focal length value and the median of each maximum focal length value as an end focal length value, or taking the median of each minimum focal length value as an end focal length value and the median of each maximum focal length value as an initial focal length value;
the identification module is used for adjusting the focal length of the image acquisition equipment based on the focal length parameter, and after each adjustment, the current image acquired by the image acquisition equipment is identified until the image content is successfully identified; wherein the step of adjusting the focal length of the image acquisition device based on the focal length parameter comprises: setting the current focal length of the image acquisition equipment as an initial focal length value; if the image is not successfully identified, a change quantity is superposed on the current focal length of the image acquisition equipment so that the current focal length value tends to change towards the termination focal length value.
5. The apparatus of claim 4, wherein the focus parameters further comprise scene identifications, each scene identification corresponding to a set of initial focus values and end focus values; the parameter processing module is further configured to:
determining a current scene identifier according to a current using scene of the image acquisition equipment, and acquiring an initial focal length value and a final focal length value corresponding to the current scene identifier.
6. The apparatus of claim 5, wherein the parameter processing module is further configured to:
recording the current focal length when the user successfully identifies the image content as a sample focal length value, and determining a scene identifier of the sample focal length value according to a use scene when the user successfully identifies the image content;
classifying the focal length values of the samples according to the scene identifications, respectively selecting a minimum value from all the categories as a minimum focal length value of the user corresponding to each scene identification, and selecting a maximum value from all the categories as a maximum focal length value of the user corresponding to each scene identification;
the minimum focal length value and the maximum focal length value of each scene identification corresponding to a plurality of users are obtained, the median of each minimum focal length value corresponding to the scene identification is used as the initial focal length value corresponding to the scene identification, and the median of each maximum focal length value corresponding to the scene identification is used as the final focal length value corresponding to the scene identification.
7. An electronic device for recognizing an image, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-3.
8. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-3.
CN201810870101.2A 2018-08-02 2018-08-02 Method and device for identifying image Active CN110798608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810870101.2A CN110798608B (en) 2018-08-02 2018-08-02 Method and device for identifying image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810870101.2A CN110798608B (en) 2018-08-02 2018-08-02 Method and device for identifying image

Publications (2)

Publication Number Publication Date
CN110798608A CN110798608A (en) 2020-02-14
CN110798608B true CN110798608B (en) 2022-09-30

Family

ID=69425600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810870101.2A Active CN110798608B (en) 2018-08-02 2018-08-02 Method and device for identifying image

Country Status (1)

Country Link
CN (1) CN110798608B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108174105A (en) * 2018-02-06 2018-06-15 联想(北京)有限公司 For the image processing method and device of electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10210602B2 (en) * 2011-10-17 2019-02-19 Sharp Laboratories Of America, Inc. System and method for normalized focal length profiling
US8830380B2 (en) * 2012-06-28 2014-09-09 International Business Machines Corporation Depth of focus in digital imaging systems
CN105872384A (en) * 2016-05-12 2016-08-17 深圳市金立通信设备有限公司 Photographing method and terminal
CN107358234A (en) * 2017-07-17 2017-11-17 上海青橙实业有限公司 The recognition methods of identification code and device
CN108235816B (en) * 2018-01-10 2020-10-16 深圳前海达闼云端智能科技有限公司 Image recognition method, system, electronic device and computer program product

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108174105A (en) * 2018-02-06 2018-06-15 联想(北京)有限公司 For the image processing method and device of electronic equipment

Also Published As

Publication number Publication date
CN110798608A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
US20190188530A1 (en) Method and apparatus for processing image
CN109255337B (en) Face key point detection method and device
CN109118456B (en) Image processing method and device
US11216924B2 (en) Method and apparatus for processing image
CN109377508B (en) Image processing method and device
CN111784712B (en) Image processing method, device, equipment and computer readable medium
CN109993749B (en) Method and device for extracting target image
WO2020078050A1 (en) Comment information processing method and apparatus, and server, terminal and readable medium
CN111367870A (en) Method, device and system for sharing picture book
CN109413056B (en) Method and apparatus for processing information
CN110288625B (en) Method and apparatus for processing image
CN116756444B (en) Image processing method, device, equipment and storage medium
CN112685481B (en) Data processing method and device
CN110895699B (en) Method and apparatus for processing feature points of image
CN109523564B (en) Method and apparatus for processing image
CN110798608B (en) Method and device for identifying image
CN110827254A (en) Method and device for determining image definition
CN111178352A (en) Method and device for identifying verification code characters
CN109034085B (en) Method and apparatus for generating information
CN110555799A (en) Method and apparatus for processing video
CN112770044A (en) Method and device for taking self-timer image
CN110852250A (en) Vehicle weight removing method and device based on maximum area method and storage medium
CN112000218B (en) Object display method and device
CN111597476B (en) Image processing method and device
CN112104812B (en) Picture acquisition 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