CN110765304A - Image processing method, image processing device, electronic equipment and computer readable medium - Google Patents

Image processing method, image processing device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN110765304A
CN110765304A CN201911008229.9A CN201911008229A CN110765304A CN 110765304 A CN110765304 A CN 110765304A CN 201911008229 A CN201911008229 A CN 201911008229A CN 110765304 A CN110765304 A CN 110765304A
Authority
CN
China
Prior art keywords
image
preprocessed
recognized
database
feature points
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.)
Pending
Application number
CN201911008229.9A
Other languages
Chinese (zh)
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.)
Zhuhai Fruit Technology Co Ltd
Original Assignee
Zhuhai Fruit 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 Zhuhai Fruit Technology Co Ltd filed Critical Zhuhai Fruit Technology Co Ltd
Priority to CN201911008229.9A priority Critical patent/CN110765304A/en
Publication of CN110765304A publication Critical patent/CN110765304A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Library & Information Science (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an image processing method, an image processing device, electronic equipment and a computer storage medium, wherein the method comprises the following steps: acquiring an image to be identified; preprocessing an image to be recognized to obtain a preprocessed image; and determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image. In the embodiment of the invention, the image to be recognized can be preprocessed before the feature points of the image to be recognized are extracted, so that the features obtained by extracting the features based on the preprocessed image more accurately reflect the features of the image to be recognized, the defects of the image to be recognized caused by shooting are reduced, and the target image matched with the image to be recognized can be accurately recognized from the database.

Description

Image processing method, image processing device, electronic equipment and computer readable medium
Technical Field
The invention relates to the technical field of multimedia processing, in particular to an image processing method, an image processing device, electronic equipment and a computer readable medium.
Background
The existing image recognition method directly extracts the features of the collected picture, and then matches the feature points based on the sample images in the database to realize the recognition of the images. Secondly, under the condition of poor contrast or definition, the number of the extracted features of the image to be identified is small, so that the final matching result is inaccurate.
Disclosure of Invention
The invention aims to solve at least one of the technical defects and improve the accuracy of audio and video parameters. The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides an image processing method, comprising:
acquiring an image to be identified;
preprocessing an image to be recognized to obtain a preprocessed image;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image.
In an embodiment of the first aspect of the invention, the pre-processing comprises at least one of a fluoroscopy processing and a defogging processing;
if the preprocessing comprises perspective processing, preprocessing the image to be recognized to obtain a preprocessed image, wherein the preprocessing comprises the following steps:
performing perspective processing on an image to be recognized to obtain a top view, and taking the top view as a preprocessed image;
if the preprocessing comprises defogging processing, preprocessing the image to be recognized to obtain a preprocessed image, wherein the preprocessing comprises the following steps:
and performing histogram statistics on the image to be identified, performing defogging treatment on the image after the histogram statistics to obtain a defogged image, and taking the defogged image as a preprocessed image.
In an embodiment of the first aspect of the invention, after obtaining the pre-processed image, the method further comprises:
counting the feature response of the preprocessed image, wherein the feature response is used for representing the feature intensity of the pixel points;
and determining pixel points meeting the preset conditions based on the characteristic response of each pixel point, and taking the pixel points meeting the preset conditions as the characteristic points of the preprocessed image.
In an embodiment of the first aspect of the invention, the clustering vectors of the images in the database; determining whether a target image matched with the image to be recognized exists in a database or not based on the feature points of the preprocessed image, wherein the determining comprises the following steps:
clustering the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image;
determining similarity values between the cluster vectors of the preprocessed images and the cluster vectors of the images in the database;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the similarity values.
In the embodiment of the first aspect of the invention, the feature points of the preprocessed image are clustered to obtain a clustering vector of the preprocessed image; the method comprises the following steps:
inputting the feature points of the preprocessed image into a similarity matching model to obtain a clustering vector of the feature points of the preprocessed image;
the similarity matching model is obtained based on feature point training of images in a database, the input of the similarity matching model is the feature points of the images, and the output of the similarity matching model is the clustering vector of the images.
In an embodiment of the first aspect of the present invention, determining whether there is a target image matching the image to be recognized in the database based on the similarity values includes:
and comparing the maximum value of the similarity values with a set value, if the maximum value is larger than the set value, taking the image corresponding to the maximum value as a target image, and if the maximum value is not larger than the set value, not existing the target image matched with the image to be recognized in the database.
In an embodiment of the first aspect of the present invention, if the target image exists in the database, the method further includes:
and determining and playing an audio file of the target image.
In an embodiment of the first aspect of the invention, the image is a picture image.
In a second aspect, the present invention provides an image processing apparatus comprising:
the image acquisition module is used for acquiring an image to be identified;
the preprocessing module is used for preprocessing the image to be recognized to obtain a preprocessed image;
and the image processing module is used for determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image.
In an embodiment of the second aspect of the invention, the pre-processing comprises at least one of perspective processing and defogging processing; if the preprocessing includes perspective processing, the preprocessing module is specifically configured to, when preprocessing the image to be recognized to obtain a preprocessed image:
performing perspective processing on an image to be recognized to obtain a top view, and taking the top view as a preprocessed image;
if the preprocessing includes defogging, the preprocessing module is specifically configured to, when preprocessing the image to be recognized to obtain a preprocessed image:
and performing histogram statistics on the image to be identified, performing defogging treatment on the image after the histogram statistics to obtain a defogged image, and taking the defogged image as a preprocessed image.
In an embodiment of the second aspect of the invention, after obtaining the pre-processed image, the apparatus further comprises:
the characteristic point determining module is used for counting the characteristic response of the preprocessed image, and the characteristic response is used for representing the characteristic intensity of the pixel points; and determining pixel points meeting the preset conditions based on the characteristic response of each pixel point, and taking the pixel points meeting the preset conditions as the characteristic points of the preprocessed image.
In an embodiment of the second aspect of the invention, the clustering vector of each image in the database; the image processing module is specifically configured to, when determining whether a target image matched with the image to be recognized exists in the database based on the feature points of the preprocessed image:
clustering the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image;
determining similarity values between the cluster vectors of the preprocessed images and the cluster vectors of the images in the database;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the similarity values.
In an embodiment of the second aspect of the present invention, when the image processing module performs clustering on the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image, the image processing module is specifically configured to:
inputting the feature points of the preprocessed image into a similarity matching model to obtain a clustering vector of the feature points of the preprocessed image;
the similarity matching model is obtained based on feature point training of images in a database, the input of the similarity matching model is the feature points of the images, and the output of the similarity matching model is the clustering vector of the images.
In an embodiment of the second aspect of the present invention, when determining whether there is a target image matching the image to be recognized in the database based on the similarity values, the image processing module is specifically configured to:
and comparing the maximum value of the similarity values with a set value, if the maximum value is larger than the set value, taking the image corresponding to the maximum value as a target image, and if the maximum value is not larger than the set value, not existing the target image matched with the image to be recognized in the database.
In an embodiment of the second aspect of the present invention, if there is a target image in the database, the apparatus further includes:
and the audio playing module is used for determining and playing the audio file of the target image.
In an embodiment of the second aspect of the invention, the image is a picture book image.
In a third aspect, the present invention provides an electronic device, comprising:
a processor and a memory;
a memory for storing computer operating instructions;
a processor for performing the method as shown in any of the embodiments of the first aspect of the present invention by invoking computer operational instructions.
In a fourth aspect, the present invention provides a computer readable medium having stored thereon at least one instruction, at least one program, set of codes or set of instructions, which is loaded and executed by a processor to implement a method as set forth in any one of the embodiments of the first aspect of the invention.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
according to the image processing method, the image processing device, the electronic equipment and the computer readable medium, the image to be recognized can be preprocessed before the feature points of the image to be recognized are extracted, so that the features obtained by feature extraction based on the preprocessed image can more accurately reflect the features of the image to be recognized, the defects of the image to be recognized caused by shooting are reduced, and the target image matched with the image to be recognized can be accurately recognized from the database.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly described below.
Fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and are not used for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes the technical solution of the present invention and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
In view of the above technical problem, an embodiment of the present invention provides an image processing method, as shown in fig. 1, the method may include:
and step S110, acquiring an image to be identified.
The image to be recognized refers to an image to be recognized, and the image may be obtained by shooting through a shooting terminal or an image drawn by a user. The shooting terminal refers to a terminal device with a shooting function. The image may be an image uploaded by a user or an image obtained from the internet in real time, and the source of the image is not limited in the application.
Optionally, the image to be recognized may be a sketch image.
And step S120, preprocessing the image to be recognized to obtain a preprocessed image.
The purpose of the preprocessing is to make the image quality of the image to be recognized after processing better, or to make the quality of the feature points extracted from the preprocessed image better. The preprocessing method including but not limited to denoising, contrast enhancement, etc. is within the scope of the present application.
Step S130, whether a target image matched with the image to be recognized exists in the database or not is determined based on the feature points of the preprocessed image.
A database may store a large number of images in advance, and the images are used as a basis for identifying whether the acquired image (image to be identified) is an image in the database, and the image in the database may be continuously updated.
According to the scheme provided by the embodiment of the invention, the image to be recognized can be preprocessed before the feature points of the image to be recognized are extracted, so that the features obtained by feature extraction based on the preprocessed image can more accurately reflect the features of the image to be recognized, the defects of the image to be recognized caused by shooting are reduced, and the target image matched with the image to be recognized can be accurately recognized from the database.
In an embodiment of the present invention, the preprocessing includes at least one of perspective processing and defogging processing;
if the preprocessing includes perspective processing, in step S120, preprocessing the image to be recognized to obtain a preprocessed image, which may include:
and performing perspective processing on the image to be recognized to obtain a top view, and taking the top view as a preprocessed image.
The perspective processing is carried out on the image, so that the difference caused by the images with different placing positions and different rotation angles can be reduced, the extracted feature points are more accurate, and the obtained result is more accurate when the feature points based on the image to be identified are subjected to subsequent processing.
If the preprocessing includes defogging, in step S120, preprocessing the image to be recognized to obtain a preprocessed image, which may include:
and performing histogram statistics on the image to be identified, performing defogging treatment on the image after the histogram statistics to obtain a defogged image, and taking the defogged image as a preprocessed image.
If the image to be recognized is shot under the condition of light reflection, the contrast is poor, and the image with poor definition is subjected to defogging treatment, so that the difference caused by the reasons can be reduced, the extracted feature points are more accurate, and the obtained result is more accurate when the feature points based on the image to be recognized are subjected to subsequent treatment.
It can be understood that the two processes, i.e., the perspective process and the defogging process, may be performed on the image to be recognized at the same time, or only one kind of preprocessing may be performed on the image to be recognized, and the configuration may be specifically required based on actual needs.
In an embodiment of the present invention, after obtaining the preprocessed image, the method may further include:
counting the feature response of the preprocessed image, wherein the feature response is used for representing the feature intensity of the pixel points;
and determining pixel points meeting the preset conditions based on the characteristic response of each pixel point, and taking the pixel points meeting the preset conditions as the characteristic points of the preprocessed image.
The image comprises a plurality of feature points, and the point which can reflect the image features most can be selected as the feature point. Each pixel point in the image has a characteristic response, the value of the characteristic response can represent the characteristic intensity of the pixel point, and the pixel point with stronger characteristic intensity has larger characteristic response.
The preset condition can be a characteristic response threshold value, the characteristic response threshold value represents an intensity threshold value, and the pixel points meeting the preset condition refer to the pixel points with the characteristic intensity greater than the intensity threshold value.
It should be noted that, the determination of the image feature points is not limited to the above manner, and feature point extraction algorithms in the prior art, for example, SIFT algorithm, SURF algorithm, and the like, may also be used to extract feature points of an image.
In the embodiment of the invention, the clustering vector of each image in the database; determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image, wherein the determining may include:
clustering the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image;
determining similarity values between the cluster vectors of the preprocessed images and the cluster vectors of the images in the database;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the similarity values.
After the feature points of the image to be recognized are determined, further processing can be performed on the basis of the feature points of the image to obtain a clustering vector of the image, and the features of the image are further determined through the clustering vector. The cluster vector may be a BOF (Bag of Features) vector. Then, whether the target image exists in the database is determined based on the similarity value between the preprocessed clustering vector and the clustering vector of each image in the database.
In the embodiment of the present invention, clustering the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image may include:
and determining a clustering vector of the preprocessed image based on the class center in the database and the feature points of the preprocessed image. The class center can be obtained by processing the characteristic points of the images in the database through a k-means algorithm. The specific method comprises the following steps: judging which type center each characteristic point of the image is closest to, placing the type center most recently, and finally generating a list of frequency tables, namely a primary clustering vector. And then, adding weight to the frequency table through tf-idf (term frequency-inverse document frequency) to generate a final clustering vector.
In an embodiment of the present invention, determining a similarity value between the cluster vector of the preprocessed image and the cluster vector of each image in the database may include:
calculating a vector included angle between the clustering vector of the preprocessed image and the clustering vector of each image in the database;
and determining the similarity value between the clustering vector of the preprocessed image and the clustering vector of each image in the database based on each vector included angle.
The smaller the vector included angle is, the larger the similarity value is, and based on the similarity value, whether a target image matched with the image to be recognized exists in the database can be determined.
In the embodiment of the invention, the feature points of the preprocessed image are clustered to obtain a clustering vector of the preprocessed image; the method can comprise the following steps:
inputting the feature points of the preprocessed image into a similarity matching model to obtain a clustering vector of the feature points of the preprocessed image;
the similarity matching model is obtained based on feature point training of images in a database, the input of the similarity matching model is the feature points of the images, and the output of the similarity matching model is the clustering vector of the images.
The determined clustering vector can be determined through a similarity matching model, the input of the similarity matching model is the feature points of the images, the output of the similarity matching model is the clustering vector of the images, the model is obtained based on the feature point training of each image in the database, and the specific training process can be as follows: the characteristic points of the images in the database are processed through a k-means algorithm to obtain the clustering vector of each image, then the initial model is trained based on the characteristic points of each image and the clustering vector of each image, and the trained model is used as the similarity matching model applied in the embodiment of the invention.
In the embodiment of the present invention, determining whether there is a target image matching the image to be recognized in the database based on each similarity value may include:
and comparing the maximum value of the similarity values with a set value, if the maximum value is larger than the set value, taking the image corresponding to the maximum value as a target image, and if the maximum value is not larger than the set value, not existing the target image matched with the image to be recognized in the database.
After the similarity values of the image to be recognized and the images in the database are obtained, whether an image matched with the image to be recognized exists in the database can be determined based on the similarity values, for example, an image corresponding to the value with the largest similarity value in the similarity values is selected as a target image matched with the image to be recognized.
In the embodiment of the present invention, if the target image exists in the database, the method further includes:
and determining and playing an audio file of the target image.
After the target image is determined, the audio file corresponding to the target image can be determined based on the target image, and the audio file is played to meet the requirements of the user. The audio file may be stored in a database or may be acquired from the internet in real time, and the method for acquiring the audio file is not limited in the present application and is within the scope of the present application.
Based on the same principle as the image processing method shown in fig. 1, an embodiment of the present invention also provides an image processing apparatus 20, as shown in fig. 2, where the apparatus 20 may include: an image acquisition module 210, a pre-processing module 220, and an image processing module 230, wherein,
an image obtaining module 210, configured to obtain an image to be identified;
the preprocessing module 220 is configured to preprocess an image to be recognized to obtain a preprocessed image;
and the image processing module 230 is configured to determine whether a target image matched with the image to be recognized exists in the database based on the feature points of the preprocessed image.
The image processing device provided by the embodiment of the invention can be used for preprocessing the image to be recognized before extracting the feature points of the image to be recognized, so that the features obtained by feature extraction based on the preprocessed image can more accurately reflect the features of the image to be recognized, the defects of the image to be recognized caused by shooting are reduced, and the target image matched with the image to be recognized can be accurately recognized from the database.
Optionally, the pre-processing comprises at least one of perspective processing and defogging processing; if the preprocessing includes perspective processing, the preprocessing module is specifically configured to, when preprocessing the image to be recognized to obtain a preprocessed image:
performing perspective processing on an image to be recognized to obtain a top view, and taking the top view as a preprocessed image;
if the preprocessing includes defogging, the preprocessing module is specifically configured to, when preprocessing the image to be recognized to obtain a preprocessed image:
and performing histogram statistics on the image to be identified, performing defogging treatment on the image after the histogram statistics to obtain a defogged image, and taking the defogged image as a preprocessed image.
Optionally, after obtaining the pre-processed image, the apparatus further includes:
the characteristic point determining module is used for counting the characteristic response of the preprocessed image, and the characteristic response is used for representing the characteristic intensity of the pixel points; and determining pixel points meeting the preset conditions based on the characteristic response of each pixel point, and taking the pixel points meeting the preset conditions as the characteristic points of the preprocessed image.
Optionally, a cluster vector of each image in the database; the image processing module is specifically configured to, when determining whether a target image matched with the image to be recognized exists in the database based on the feature points of the preprocessed image:
clustering the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image;
determining similarity values between the cluster vectors of the preprocessed images and the cluster vectors of the images in the database;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the similarity values.
Optionally, the image processing module is specifically configured to, when performing clustering processing on the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image:
inputting the feature points of the preprocessed image into a similarity matching model to obtain a clustering vector of the feature points of the preprocessed image;
the similarity matching model is obtained based on feature point training of images in a database, the input of the similarity matching model is the feature points of the images, and the output of the similarity matching model is the clustering vector of the images.
Optionally, when determining whether there is a target image matching the image to be recognized in the database based on the similarity values, the image processing module is specifically configured to:
and comparing the maximum value of the similarity values with a set value, if the maximum value is larger than the set value, taking the image corresponding to the maximum value as a target image, and if the maximum value is not larger than the set value, not existing the target image matched with the image to be recognized in the database.
Optionally, if the target image exists in the database, the apparatus further includes:
and the audio playing module is used for determining and playing the audio file of the target image.
The apparatus according to the embodiment of the present invention can execute the image processing method shown in fig. 1, and the implementation principle is similar, the actions executed by the modules in the image processing apparatus according to the embodiments of the present invention correspond to the steps in the image processing method according to the embodiments of the present invention, and for the detailed functional description of the modules in the image processing apparatus, reference may be specifically made to the description in the corresponding image processing method shown in the foregoing, and details are not repeated here.
Based on the same principle as the method in the embodiment of the present invention, reference is made to fig. 3, which shows a schematic structural diagram of an electronic device (e.g. the terminal device or the server in fig. 1) 600 suitable for implementing the embodiment of the present invention. The terminal device in the embodiments of the present invention may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 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.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as the processing device 601 hereinafter, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603 and a storage device 608 hereinafter, which are specifically shown as follows:
as shown in fig. 3, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 3 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, an embodiment of the invention includes a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing means 601, performs the above-described functions defined in the method of an embodiment of the invention.
It should be noted that the computer readable medium of 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, either in baseband or as part of a carrier wave. Such a propagated data signal may take many 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an image to be identified; preprocessing an image to be recognized to obtain a preprocessed image; and determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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 or units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. Wherein the designation of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents is encompassed without departing from the spirit of the disclosure. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the invention. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. An image processing method, comprising:
acquiring an image to be identified;
preprocessing the image to be identified to obtain a preprocessed image;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image.
2. The method of claim 1, wherein the pre-processing comprises at least one of perspective processing and defogging processing;
if the preprocessing comprises the perspective processing, preprocessing the image to be recognized to obtain a preprocessed image, wherein the preprocessing comprises the following steps:
performing perspective processing on the image to be recognized to obtain a top view, and taking the top view as the preprocessed image;
if the preprocessing comprises the defogging processing, preprocessing the image to be identified to obtain a preprocessed image, wherein the preprocessing comprises the following steps:
and carrying out histogram statistics on the image to be identified, carrying out defogging treatment on the image after the histogram statistics to obtain a defogged image, and taking the defogged image as the preprocessed image.
3. The method of claim 2, wherein after obtaining the pre-processed image, the method further comprises:
counting the characteristic response of the preprocessed image, wherein the characteristic response is used for representing the characteristic intensity of a pixel point;
and determining pixel points meeting preset conditions based on the characteristic response of each pixel point, and taking the pixel points meeting the preset conditions as the characteristic points of the preprocessed image.
4. The method according to any one of claims 1 to 3, wherein a cluster vector for each image in the database; the determining whether a target image matched with the image to be recognized exists in the database based on the feature points of the preprocessed image comprises the following steps:
clustering the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image;
determining similarity values between the clustering vectors of the preprocessed images and the clustering vectors of the images in the database;
and determining whether a target image matched with the image to be recognized exists in the database or not based on the similarity values.
5. The method according to claim 4, wherein the clustering process is performed on the feature points of the preprocessed image to obtain a clustering vector of the preprocessed image; the method comprises the following steps:
inputting the feature points of the preprocessed image into a similarity matching model to obtain a clustering vector of the feature points of the preprocessed image;
the similarity matching model is obtained by training based on the feature points of the images in the database, the input of the similarity matching model is the feature points of the images, and the output is the clustering vector of the images.
6. The method of claim 4, wherein the determining whether there is a target image in the database that matches the image to be recognized based on the similarity values comprises:
and comparing the maximum value of all the similarity values with a set value, if the maximum value is larger than the set value, taking the image corresponding to the maximum value as the target image, and if the maximum value is not larger than the set value, not existing the target image matched with the image to be recognized in the database.
7. The method of any one of claims 1 to 3, wherein if the target image is present in the database, the method further comprises:
and determining and playing an audio file of the target image.
8. An image processing apparatus characterized by comprising:
the image acquisition module is used for acquiring an image to be identified;
the preprocessing module is used for preprocessing the image to be identified to obtain a preprocessed image;
and the image processing module is used for determining whether a target image matched with the image to be recognized exists in the database or not based on the feature points of the preprocessed image.
9. An electronic device, comprising:
a processor and a memory;
a memory for storing computer operating instructions;
a processor for executing the method of any one of claims 1 to 7 by invoking computer operational instructions.
10. A computer readable medium storing at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the method of any one of claims 1 to 7.
CN201911008229.9A 2019-10-22 2019-10-22 Image processing method, image processing device, electronic equipment and computer readable medium Pending CN110765304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911008229.9A CN110765304A (en) 2019-10-22 2019-10-22 Image processing method, image processing device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911008229.9A CN110765304A (en) 2019-10-22 2019-10-22 Image processing method, image processing device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN110765304A true CN110765304A (en) 2020-02-07

Family

ID=69333004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911008229.9A Pending CN110765304A (en) 2019-10-22 2019-10-22 Image processing method, image processing device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110765304A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858982A (en) * 2020-04-27 2020-10-30 北京迈格威科技有限公司 Image searching method and device and electronic equipment
CN116563864A (en) * 2023-07-07 2023-08-08 深圳创维智慧科技有限公司 Page number recognition method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096261A (en) * 2014-05-13 2015-11-25 北京大学 Image processing device and image processing method
CN106740474A (en) * 2016-12-23 2017-05-31 深圳市豪恩汽车电子装备有限公司 Panorama reverse image processing method and processing device
CN106971166A (en) * 2017-03-29 2017-07-21 纵目科技(上海)股份有限公司 The image pre-processing method and system of parking stall detection
CN107578439A (en) * 2017-07-19 2018-01-12 阿里巴巴集团控股有限公司 Generate the method, apparatus and equipment of target image
CN108460124A (en) * 2018-02-26 2018-08-28 北京物灵智能科技有限公司 Exchange method and electronic equipment based on figure identification
CN108921209A (en) * 2018-06-21 2018-11-30 杭州骑轻尘信息技术有限公司 Image identification method, device and electronic equipment
CN110058705A (en) * 2019-04-28 2019-07-26 视辰信息科技(上海)有限公司 It draws this aid reading method, calculate equipment, point reading side apparatus and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096261A (en) * 2014-05-13 2015-11-25 北京大学 Image processing device and image processing method
CN106740474A (en) * 2016-12-23 2017-05-31 深圳市豪恩汽车电子装备有限公司 Panorama reverse image processing method and processing device
CN106971166A (en) * 2017-03-29 2017-07-21 纵目科技(上海)股份有限公司 The image pre-processing method and system of parking stall detection
CN107578439A (en) * 2017-07-19 2018-01-12 阿里巴巴集团控股有限公司 Generate the method, apparatus and equipment of target image
CN108460124A (en) * 2018-02-26 2018-08-28 北京物灵智能科技有限公司 Exchange method and electronic equipment based on figure identification
CN108921209A (en) * 2018-06-21 2018-11-30 杭州骑轻尘信息技术有限公司 Image identification method, device and electronic equipment
CN110058705A (en) * 2019-04-28 2019-07-26 视辰信息科技(上海)有限公司 It draws this aid reading method, calculate equipment, point reading side apparatus and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙伟等: "《嵌入式图像处理系统工程案例精选:DaVinci系统设计与实现》", 30 April 2017, 西安:西安电子科技大学出版社 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858982A (en) * 2020-04-27 2020-10-30 北京迈格威科技有限公司 Image searching method and device and electronic equipment
CN116563864A (en) * 2023-07-07 2023-08-08 深圳创维智慧科技有限公司 Page number recognition method and device, electronic equipment and readable storage medium
CN116563864B (en) * 2023-07-07 2023-10-24 深圳创维智慧科技有限公司 Page number recognition method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN108830235B (en) Method and apparatus for generating information
CN111368685B (en) Method and device for identifying key points, readable medium and electronic equipment
CN111369427B (en) Image processing method, image processing device, readable medium and electronic equipment
CN109993150B (en) Method and device for identifying age
CN110188719B (en) Target tracking method and device
CN110826567B (en) Optical character recognition method, device, equipment and storage medium
CN109583389B (en) Drawing recognition method and device
CN113505848B (en) Model training method and device
CN109934142B (en) Method and apparatus for generating feature vectors of video
CN111950570B (en) Target image extraction method, neural network training method and device
CN110209658B (en) Data cleaning method and device
CN113449070A (en) Multimodal data retrieval method, device, medium and electronic equipment
CN111784712A (en) Image processing method, device, equipment and computer readable medium
CN113033677A (en) Video classification method and device, electronic equipment and storage medium
CN111402122A (en) Image mapping processing method and device, readable medium and electronic equipment
CN110046571B (en) Method and device for identifying age
CN109919220B (en) Method and apparatus for generating feature vectors of video
CN111126159A (en) Method, apparatus, electronic device, and medium for tracking pedestrian in real time
CN110765304A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN112990176A (en) Writing quality evaluation method and device and electronic equipment
CN112907628A (en) Video target tracking method and device, storage medium and electronic equipment
CN110674813B (en) Chinese character recognition method and device, computer readable medium and electronic equipment
CN110349108B (en) Method, apparatus, electronic device, and storage medium for processing image
CN113033552B (en) Text recognition method and device and electronic equipment
CN115222969A (en) Identification information identification method, device, equipment, readable storage medium and product

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200207

RJ01 Rejection of invention patent application after publication