WO2019153286A1 - Procédé et dispositif de classification d'images - Google Patents

Procédé et dispositif de classification d'images Download PDF

Info

Publication number
WO2019153286A1
WO2019153286A1 PCT/CN2018/076081 CN2018076081W WO2019153286A1 WO 2019153286 A1 WO2019153286 A1 WO 2019153286A1 CN 2018076081 W CN2018076081 W CN 2018076081W WO 2019153286 A1 WO2019153286 A1 WO 2019153286A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
information
image file
feature information
classification
Prior art date
Application number
PCT/CN2018/076081
Other languages
English (en)
Chinese (zh)
Inventor
孙伟
谭利文
杜明亮
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/076081 priority Critical patent/WO2019153286A1/fr
Priority to CN201880085333.5A priority patent/CN111566639A/zh
Publication of WO2019153286A1 publication Critical patent/WO2019153286A1/fr

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

Definitions

  • the embodiments of the present application relate to the field of image processing, and in particular, to an image classification method and device.
  • Image classification is a method in which a device automatically divides a plurality of images into at least two types of images according to feature information of each image in a plurality of images for classification management. In the process of image classification, the amount of calculation required for the device to analyze multiple images to obtain their feature information is large.
  • the image a is transmitted to another device, and when the other device performs image classification on the image a, it is necessary to perform image analysis on the image a again to acquire the feature of the image a. information. Among them, repeatedly acquiring the feature information of the same image will generate a large amount of redundant calculation.
  • the embodiment of the present application provides an image classification method and device, which can reduce the calculation amount in the image classification process and improve the image classification efficiency.
  • an embodiment of the present application provides an image classification method, where the image classification method includes: capturing image data by a device, and acquiring image generation information when capturing image data, and generating a first image file including image data and image generation information. And then performing an image classification operation on the first image file using the image generation information; the device displays the first image file in the catalogue of the gallery in response to the operation for viewing the gallery.
  • the image generation information when the image data is captured may be acquired, and then the first image file including the image data and the image generation information is generated.
  • the image classification operation can be directly performed using the image generation information. That is, the device can skip the recognition image data to obtain image generation information. In this way, the amount of calculation in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the image generation information may include: information of a shooting parameter, information of a shooting mode, information of a shooting scene, and information of a camera type.
  • the shooting parameter may include a parameter such as an exposure value, the panoramic mode, a normal mode, and the like
  • the shooting scene may include a person shooting scene, a building shooting scene, and a natural Scenery shooting scenes, indoor shooting scenes, and outdoor shooting scenes.
  • the classification feature information is feature information obtained by performing an image recognition operation on the image data.
  • the camera type is used to indicate that the image data was captured using a front camera or a rear camera.
  • the image generation information further includes character feature information.
  • the character feature information includes information such as the number of faces, face indication information, face location information, indication information of other objects (such as animals), and the number of other objects.
  • the face indication information is used to indicate that the image data of the first image file includes a face or does not include a face; the indication information of the other object is used to indicate that the image data includes other objects or does not include other objects; Used to indicate the position of the face in the image data.
  • the device when performing the image classification operation, may perform an image recognition operation on the image data to analyze the image data to obtain image generation information. That is, the device can skip the image recognition operation on the image data to obtain the image generation information. That is to say, the above image generation information is not obtained by performing an image recognition operation. In this way, the amount of calculation in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the feature information required by the device to perform the image classification operation includes not only the image generation information but also the classification feature information.
  • the foregoing apparatus performs image classification operation on the first image file by using image generation information, including: performing, by the device, an image recognition operation on the image data to analyze the image data to obtain classification feature information; and the device uses the image generation information and the classification feature information, An image classification operation is performed on the first image file.
  • the device may further save the classification feature information in the first image file to obtain the updated first image file.
  • the feature information image generation information and classification feature information
  • the image classification algorithm used by the device to analyze the image data to obtain different feature information is different.
  • the image classification algorithm used by the device to analyze image data to obtain image generation information includes a first algorithm.
  • the device does not perform an image recognition operation on the image data
  • the method for analyzing the image data to obtain the image generation information includes: the device performs an image recognition operation on the image data without using the first algorithm, and analyzes the image data to obtain the image corresponding to the first algorithm. Image generation information.
  • the first algorithm in the embodiment of the present application may include one or more image classification algorithms.
  • the image generation information in the embodiment of the present application may include feature information of one or more attributes, and the feature information of each attribute corresponds to an image classification algorithm.
  • the device may perform an image recognition operation on the image data by using a second algorithm to analyze the image data to obtain classification feature information corresponding to the second algorithm; and then use the image generation information and The feature information is classified, and an image classification operation is performed on the first image file.
  • the first algorithm is different from the second algorithm.
  • the device when the device performs an image classification operation on the first image file again, the device may read the feature information (image generation information and classification feature information) saved in the first image file.
  • the image recognition operation may be performed on the image data without using the third algorithm to analyze the image data.
  • First feature information corresponding to the third algorithm directly performing image classification operation on the first image file by using the first feature information. That is, the device can skip the recognition of the image data by using the third algorithm to analyze the image data to obtain the first feature information, and directly perform the image classification operation on the first image file by using the first feature information, thereby reducing the calculation amount of performing the image classification operation.
  • the first feature information may not be included in the first image file.
  • the device may identify the image data by using a third algorithm to acquire the first feature information, and perform an image classification operation by using the first feature information.
  • the device may save the first feature information in the first image file to obtain the updated first image file, so that when the device or other device performs the image classification operation on the first image file again, the device may directly save and save the image file.
  • the first feature information in the first image file does not need to re-use the first algorithm to identify the image data of the first image file.
  • the algorithm version used by the device to perform the image classification operation is continuously updated over time, and the same algorithm of different versions is used to identify the image data of the first image file. Characteristic information is different. Based on this, the classification feature information further includes a version of the image classification algorithm. In this case, even if the first feature information is stored in the first image file, the algorithm version identifying the first feature information and the version of the third algorithm are not necessarily the same.
  • performing the image classification operation by using the first feature information may include: determining, by the device, that the algorithm version identifying the first feature information is the same as the version of the third algorithm; and the device directly performing the image classification operation by using the first feature information, skipping The first image is identified using a third algorithm to obtain first feature information. In this way, the amount of calculation in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the method of the embodiment of the present application further includes: determining, by the device, that the algorithm version that identifies the first feature information is different from the version of the first algorithm; the device uses the third algorithm to identify the image data. And acquiring the first feature information, and performing the image classification operation by using the first feature information; and updating the first feature information saved in the first image file by using the first feature information that is identified, to obtain the updated first image file.
  • the new first feature information saved in the first image file can be directly utilized without re-using the first algorithm to identify the first Image data of an image file.
  • the format of the first image file is an Exchangeable image file format (EXIF).
  • EXIF Exchangeable image file format
  • the image generation information is saved in a Maker Note field of the first image file.
  • the above classification feature information is also saved in the Maker Note field of the first image file.
  • the image generation information is saved in a Maker Note field of the first image file in a Tagged Image File Format (TIFF) format.
  • TIFF Tagged Image File Format
  • the above classification feature information is also saved in the Maker Note field of the first image file using TIFF.
  • an embodiment of the present application provides an image classification method, where the image classification method includes: the device captures image data by using a camera; and the device acquires image generation information when capturing image data, and generates a first image including image data and image generation information.
  • An image file wherein the format of the first image file is EXIF, and the image generation information is saved in a Maker Note field of the first image file; the image generation information includes information of a shooting parameter, information of a shooting mode, information of a shooting scene, and a camera type At least one of the information; the device directly performs an image classification operation on the first image file using the image generation information; instead of performing an image recognition operation on the image data to analyze the image data to obtain image generation information, and then using the image generation information obtained by the analysis An image classification operation is performed on the first image file; finally, in response to the operation for viewing the gallery, the first image file is displayed in the catalog of the gallery.
  • the device when the camera captures image data, the device may acquire image generation information when capturing image data, and then generate a first image file including image data and image generation information.
  • the image classification operation can be directly performed using the image generation information. That is, the device can skip the recognition image data to obtain image generation information. In this way, the amount of calculation in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the foregoing apparatus performs image classification operation on the first image file by using image generation information, including: performing, by the device, an image recognition operation on the image data, to analyze the image data to obtain classification feature information; The device performs an image classification operation on the first image file using the image generation information and the classification feature information.
  • the device may save the classification feature information in the first image file to obtain the updated first image file.
  • the image generation information is saved in a Maker Note field by using TIFF.
  • an embodiment of the present application provides an apparatus, where the apparatus includes: an acquiring unit, a classifying unit, and a display unit.
  • An acquisition unit configured to capture image data, and acquire image generation information when the image data is captured, generate a first image file including the image data and the image generation information; and a classification unit configured to utilize the acquisition unit Obtaining the image generation information, performing an image classification operation on the first image file; and displaying means for displaying the first image file in a classification directory of the gallery in response to the operation for viewing the gallery.
  • the classification unit is further configured to perform an image recognition operation on the image data; wherein the image generation information is not obtained by the classification unit identifying the image data.
  • the foregoing classification unit is specifically configured to perform an image recognition operation on the image data to analyze the image data to obtain classification feature information, and use the image generation information and the classification feature information to The image file performs an image classification operation.
  • the foregoing apparatus further includes: an update unit.
  • the updating unit is configured to perform an image recognition operation on the image data by the classification unit to analyze the image data to obtain the classification feature information, and save the classification feature information in the first image file to obtain the updated first image file.
  • an embodiment of the present application provides an apparatus, including: a device, a processor, a memory, a camera, and a display; the memory and the display are coupled to the processor, the display is configured to display an image file, and the memory includes non-volatile a storage medium for storing computer program code, the computer program code comprising computer instructions for capturing image data when the processor executes the computer instruction, the processor for acquiring the camera capture Image generation information at the time of image data, generating a first image file including the image data and the image generation information; and performing image classification operation on the first image file using the image generation information.
  • the image generation information is not obtained by the processor performing an image recognition operation on the image data.
  • the processor is specifically configured to perform an image recognition operation on the image data to analyze the image data to obtain classification feature information, and use the image generation information and the classification feature information to The image file performs an image classification operation.
  • the processor is further configured to perform an image recognition operation on the image data to analyze the image data to obtain the classification feature information, and then save the classification feature information in the first image file. Get the updated first image file.
  • the image generation information, the format of the first image file, the image generation information, and the classification feature described in the second aspect, the third aspect, and the fourth aspect of the embodiments of the present application and any possible design manner thereof
  • the location of the information in the first image file, the format of the image generation information and the classification feature information in the vendor annotation field reference may be made to the related description in the first aspect of the design, which is not described herein.
  • an embodiment of the present application provides a control device, where the control device includes a processor and a memory, where the memory is used to store computer program code, where the computer program code includes computer instructions, and when the processor executes the computer instruction, the control
  • the apparatus performs the method as described in the first and second aspects of the embodiments of the present application and any of its possible design approaches.
  • the embodiment of the present application provides a computer storage medium, where the computer storage medium includes computer instructions, when the computer instruction is run on a device, causing the device to perform the first aspect of the embodiment of the present application Any of the methods described in the possible design approach.
  • the embodiment of the present application provides a computer program product, when the computer program product is run on a computer, causing the computer to perform the first aspect and the second aspect, and any one of the embodiments of the present application. The method of design described.
  • the third aspect, the fourth aspect, and any one of the design manners, and the technical effects brought by the second aspect, the fourth aspect to the seventh aspect may refer to the technology brought by different design modes in the foregoing first aspect. The effect will not be described here.
  • FIG. 1 is a schematic structural diagram of hardware of a mobile phone according to an embodiment of the present application.
  • JPEG Joint Photographic Experts Group
  • FIG. 3 is a schematic diagram of a data structure of an EXIF image file according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram 1 of a system principle framework of an image classification method according to an embodiment of the present application.
  • FIG. 5 is a flowchart 1 of an image classification method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram 2 of a system principle framework of an image classification method according to an embodiment of the present application.
  • FIG. 7A is a schematic diagram of an example of a mobile phone interface according to an embodiment of the present application.
  • FIG. 7B is a second flowchart of an image classification method according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram showing the data structure of a Maker Note field of the EXIF image shown in FIG. 3;
  • FIG. 9 is a schematic diagram 1 of a data structure of a TIFF field in the Maker Note field shown in FIG. 8;
  • FIG. 10 is a second schematic diagram of a data structure of a TIFF field in the Maker Note field shown in FIG. 8;
  • FIG. 11 is a schematic diagram 3 of a system principle framework of an image classification method according to an embodiment of the present disclosure.
  • FIG. 12 is a flowchart 3 of an image classification method according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram 1 of a device according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram 2 of a device according to an embodiment of the present disclosure.
  • first and second are used for descriptive purposes only, and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” and “second” may include one or more of the features either explicitly or implicitly.
  • the first feature information and the second feature information refer to different feature information in the first image file, and the non-first image file has two feature information.
  • the embodiment of the present application provides an image classification method, which can be applied to an image classification of a first image file by a device.
  • the image file (such as the first image file) in the embodiment of the present application refers to an image file obtained by encoding and compressing an image captured by the camera, such as a JPEG image file.
  • the image described in the embodiment of the present application can be understood as an electronic picture (hereinafter referred to as a picture).
  • the image classification in the present application refers to the device according to the feature information of the image data in each image file of the plurality of image files, such as shooting mode (such as panoramic mode) information, shooting scene (such as character scene) information, and face.
  • Information such as the number (such as 3 faces) is divided into at least two types of image files (ie, clustering a plurality of image files).
  • the devices may be a mobile phone (such as the mobile phone 100 shown in FIG. 1), a tablet computer, a personal computer (PC), and a personal digital assistant. , PDA), netbooks, wearable electronic devices, augmented reality (AR), virtual reality (VR) devices, car computers and other terminal devices.
  • a mobile phone such as the mobile phone 100 shown in FIG. 1
  • PC personal computer
  • PDA personal digital assistant
  • netbooks wearable electronic devices
  • AR augmented reality
  • VR virtual reality
  • the device may manage the image saved in the device, and perform the method provided in the embodiment of the present application to perform image classification on the image saved in the device.
  • a client or an application for managing a picture may be installed in the device, and the client may manage a picture saved in the cloud server after logging in to a picture management account; and the client may also be used for The method provided in the embodiment of the present application performs image classification on a picture in the cloud server.
  • the device in the embodiment of the present application may be a cloud server for storing and managing a picture, and the cloud server may receive the picture uploaded by the terminal, and then perform the method provided by the embodiment of the present application to perform image classification on the picture uploaded by the terminal.
  • the specific form of the above device is not specifically limited in the embodiment of the present application.
  • the mobile phone 100 is used as the device.
  • the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, and one or more sensors.
  • RF radio frequency
  • 106 Wireless Fidelity (WiFi) device 107, positioning device 108, audio circuit 109, peripheral interface 110, and power supply device 111 and the like.
  • WiFi Wireless Fidelity
  • These components can communicate over one or more communication buses or signal lines (not shown in Figure 1).
  • the hardware structure shown in FIG. 1 does not constitute a limitation to a mobile phone, and the mobile phone 100 may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the processor 101 is a control center of the mobile phone 100, and connects various parts of the mobile phone 100 by using various interfaces and lines, and executes the mobile phone 100 by running or executing an application stored in the memory 103 and calling data stored in the memory 103.
  • processor 101 can include one or more processing units.
  • the processor 101 may further include a fingerprint verification chip for verifying the collected fingerprint.
  • the radio frequency circuit 102 can be used to receive and transmit wireless signals during transmission or reception of information or calls.
  • the radio frequency circuit 102 can process the downlink data of the base station and then process it to the processor 101; in addition, transmit the data related to the uplink to the base station.
  • radio frequency circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency circuit 102 can also communicate with other devices through wireless communication.
  • the wireless communication can use any communication standard or protocol including, but not limited to, global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
  • the memory 103 is used to store applications and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running applications and data stored in the memory 103.
  • the memory 103 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); the storage data area can be stored according to the use of the mobile phone. Data created at 100 o'clock (such as audio data, phone book, etc.).
  • the memory 103 may include a high speed random access memory (RAM), and may also include a nonvolatile memory such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
  • the memory 103 can store various operating systems, for example, operating system, Operating system, etc.
  • the above memory 103 may be independent and connected to the processor 101 via the above communication bus; the memory 103 may also be integrated with the processor 101.
  • the touch screen 104 may specifically include a touch panel 104-1 and a display 104-2.
  • the touch panel 104-1 can collect touch events on or near the user of the mobile phone 100 (for example, the user uses any suitable object such as a finger, a stylus, or the like on the touch panel 104-1 or on the touchpad 104.
  • the operation near -1), and the collected touch information is sent to other devices (for example, processor 101).
  • the touch event of the user in the vicinity of the touch panel 104-1 may be referred to as a hovering touch; the hovering touch may mean that the user does not need to directly touch the touchpad in order to select, move or drag a target (eg, an icon, etc.) , and only the user is located near the device to perform the desired function.
  • the touch panel 104-1 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • a display (also referred to as display) 104-2 can be used to display information entered by the user or information provided to the user as well as various menus of the mobile phone 100.
  • the display 104-2 can be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the touchpad 104-1 can be overlaid on the display 104-2, and when the touchpad 104-1 detects a touch event on or near it, it is transmitted to the processor 101 to determine the type of touch event, and then the processor 101 may provide a corresponding visual output on display 104-2 depending on the type of touch event.
  • the touchpad 104-1 and the display 104-2 are implemented as two separate components to implement the input and output functions of the handset 100, in some embodiments, the touchpad 104- 1 is integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100. It is to be understood that the touch screen 104 is formed by stacking a plurality of layers of materials. In the embodiment of the present application, only the touch panel (layer) and the display screen (layer) are shown, and other layers are not described in the embodiment of the present application. .
  • the touch panel 104-1 may be disposed on the front surface of the mobile phone 100 in the form of a full-board
  • the display screen 104-2 may also be disposed on the front surface of the mobile phone 100 in the form of a full-board, so that the front of the mobile phone can be borderless. Structure.
  • the mobile phone 100 can also have a fingerprint recognition function.
  • the fingerprint reader 112 can be configured on the back of the handset 100 (eg, below the rear camera) or on the front side of the handset 100 (eg, below the touch screen 104).
  • the fingerprint collection device 112 can be configured in the touch screen 104 to implement the fingerprint recognition function, that is, the fingerprint collection device 112 can be integrated with the touch screen 104 to implement the fingerprint recognition function of the mobile phone 100.
  • the fingerprint capture device 112 is disposed in the touch screen 104 and may be part of the touch screen 104 or may be otherwise disposed in the touch screen 104.
  • the main component of the fingerprint collection device 112 in the embodiment of the present application is a fingerprint sensor, which can employ any type of sensing technology, including but not limited to optical, capacitive, piezoelectric or ultrasonic sensing technologies.
  • the mobile phone 100 may also include a Bluetooth device 105 for enabling data exchange between the handset 100 and other short-range devices (eg, mobile phones, smart watches, etc.).
  • the Bluetooth device in the embodiment of the present application may be an integrated circuit or a Bluetooth chip or the like.
  • the handset 100 can also include at least one type of sensor 106, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor may turn off the power of the display when the mobile phone 100 moves to the ear.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the mobile phone 100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the WiFi device 107 is configured to provide the mobile phone 100 with network access complying with the WiFi-related standard protocol, and the mobile phone 100 can access the WiFi access point through the WiFi device 107, thereby helping the user to send and receive emails, browse web pages, and access streaming media. It provides users with wireless broadband Internet access.
  • the WiFi device 107 can also function as a WiFi wireless access point, and can provide WiFi network access for other devices.
  • the positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 can be specifically a receiver of a positioning system such as a Global Positioning System (GPS) or a Beidou satellite navigation system, or a Russian GLONASS. After receiving the geographical location transmitted by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends it to the memory 103 for storage. In some other embodiments, the positioning device 108 can also be a receiver of an Assisted Global Positioning System (AGPS), which assists the positioning device 108 in performing ranging and positioning services by acting as an auxiliary server.
  • AGPS Assisted Global Positioning System
  • the secondary location server provides location assistance over a wireless communication network in communication with a location device 108 (i.e., a GPS receiver) of the device, such as handset 100.
  • the positioning device 108 can also be a WiFi access point based positioning technology. Since each WiFi access point has a globally unique Media Access Control (MAC) address, the device can scan and collect broadcast signals of surrounding WiFi access points when WiFi is turned on, so that it can be obtained. The MAC address broadcasted to the WiFi access point; the device sends the data (such as the MAC address) capable of indicating the WiFi access point to the location server through the wireless communication network, and the location server retrieves the geographical location of each WiFi access point. And in combination with the strength of the WiFi broadcast signal, the geographic location of the device is calculated and sent to the location device 108 of the device.
  • MAC Media Access Control
  • the audio circuit 109, the speaker 113, and the microphone 114 can provide an audio interface between the user and the handset 100.
  • the audio circuit 109 can transmit the converted electrical data of the received audio data to the speaker 113 for conversion to the sound signal output by the speaker 113; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal by the audio circuit 109. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for transmission to, for example, another mobile phone, or the audio data is output to the memory 103 for further processing.
  • the peripheral interface 110 is used to provide various interfaces for external input/output devices (such as a keyboard, a mouse, an external display, an external memory, a subscriber identity module card, etc.). For example, it is connected to the mouse through a Universal Serial Bus (USB) interface, and is connected to a Subscriber Identification Module (SIM) card provided by the service provider through a metal contact on the card slot of the subscriber identity module. . Peripheral interface 110 can be used to couple the external input/output peripherals described above to processor 101 and memory 103.
  • USB Universal Serial Bus
  • SIM Subscriber Identification Module
  • the mobile phone 100 can communicate with other devices in the device group through the peripheral interface 110.
  • the peripheral interface 110 can receive display data sent by other devices for display, etc. No restrictions are imposed.
  • the mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) that supplies power to the various components.
  • the battery may be logically connected to the processor 101 through the power management chip to manage charging, discharging, and power management through the power supply device 111. And other functions.
  • the mobile phone 100 may further include a camera (front camera and/or rear camera), a flash, a micro projection device, a near field communication (NFC) device, and the like, and details are not described herein.
  • a camera front camera and/or rear camera
  • a flash a flash
  • micro projection device a micro projection device
  • NFC near field communication
  • the execution body of the image classification method provided by the embodiment of the present application may be an image processing device, which is a device that can be used for managing images (such as the mobile phone 100 shown in FIG. 1), or a central processing unit of the device. (Central Processing Unit, CPU), or a control module for image processing in the device, or a client for managing images in the device.
  • image processing device which is a device that can be used for managing images (such as the mobile phone 100 shown in FIG. 1), or a central processing unit of the device. (Central Processing Unit, CPU), or a control module for image processing in the device, or a client for managing images in the device.
  • CPU Central Processing Unit
  • the image classification method performed by the above device is taken as an example, and the image classification method provided by the present application is described.
  • JPEG is an international image compression standard.
  • JFIF JPEG File Interchange Format
  • JPEG/JFIF is the most commonly used format for storing and transmitting pictures on the World Wide Web.
  • the JPEG image file (that is, the image file in the JPEG format) starts with the character string "0xFFD8" and ends with the character string "0xFFD9".
  • the JPEG image file has a series of "0xFF**" format characters in the file header, called "JPEG mark” or "JPEG segment”, which is used to mark the information segment of the JPEG image file.
  • JPEG mark or "JPEG segment”
  • “0xFFD8” is used to mark the beginning of image information
  • “0xFFD9” is used to mark the end of image information
  • the EXIF image file (that is, the image file in the EXIF format) is one of the above JPEG image files, and conforms to the JPEG standard.
  • the EXIF image adds a shooting parameter (referred to as a first shooting parameter) of the camera-captured image in the JPEG image file.
  • the first shooting parameter may include: shooting date, shooting equipment parameters (such as camera brand and model, lens parameters, flash parameters, etc.), shooting parameters (such as shutter speed, aperture F value, ISO speed, focal length, metering) Mode, etc.), image processing parameters (such as sharpening, contrast, saturation, white balance, etc.) and GPS positioning data of captured images.
  • the EXIF image file may include EXIF information, where the EXIF information includes an EXIF field 301 (a field in the EXIF image file for saving the first shooting parameter) and a Maker Note field 302.
  • the parameters are saved in the EXIF field 301.
  • the Maker Note field 302 is a field reserved for the vendor to hold vendor-specific annotation data.
  • the EXIF information starts with the character string "0xFFE0" in the EXIF image and ends with the character string "0xFFEF", which is 64 KB (kilobytes).
  • the format of the first image file in the embodiment of the present application may be EXIF (ie, the first image file may be an EXIF image file), and the feature information in the first image file may be saved in the Maker Note field of the EXIF image file.
  • the image data field 303 of the EXIF image file is used to save image data.
  • the feature information in the first image file can be read, and the image is directly executed on the first image file by using the feature information in the first image file.
  • the classification operation instead of performing an image recognition operation on the image data in the first image file, the feature information for performing the image classification operation is obtained by a large number of calculations. Through this scheme, the amount of calculation in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the format of the first image file in the embodiment of the present application includes, but is not limited to, the EXIF.
  • the first image file in the embodiment of the present application may also be another format file including a reserved field, and the reserved field may be used for saving.
  • Feature information for performing image classification operations includes, but is not limited to, the Maker Note field, and the reserved field may be used in the first image file, and may be used to save any field of the feature information for performing the image classification operation. This is not a limitation.
  • the first device may save the feature information of the image data in the first image file during the process of capturing the image and performing the image classification operation, and directly use the image file stored in the image file when performing the image classification operation.
  • Feature information may be saved.
  • the device may acquire feature information (image generation information in the embodiment of the present application) when the image data is collected by the camera, and save the feature information in the first image file (ie, perform 401). Generating a first image file 403; subsequently, when the image classification engine 402 of the device performs an image classification operation, the feature information (ie, image generation information) in the first image file 403 may be directly read, and the image data of the first image file is identified. Obtaining new feature information (such as classification feature information in the embodiment of the present application); then performing image classification operation on the first image file by using the read feature information and the new feature information; finally, the identified new Feature information, updating feature information in the first image file (eg, adding new feature information).
  • new feature information such as classification feature information in the embodiment of the present application
  • the embodiment of the present application provides an image classification method.
  • the format of the first image file is EXIF (ie, the first image file is an EXIF image file), and the feature information is stored in the Maker Note field of the EXIF image file as an example, and is implemented in the present application.
  • the image classification method provided by the example is explained. As shown in FIG. 5, the method in this embodiment of the present application includes S501-S503:
  • the first device captures image data, and acquires image generation information when capturing image data, and generates a first image file including image data and image generation information.
  • the preset field (such as the Maker Note field) of the first image file (such as the EXIF image file) of the embodiment of the present application may be used to save the feature information of the image data of the first image file.
  • the feature information may include image generation information.
  • the image generation information is feature information acquired by the first device when the camera of the first device captures the image data. For a detailed example of the image generation information, reference may be made to the subsequent description of the embodiments of the present application, and details are not described herein.
  • a first image file including image data may be generated after the first device captures image data.
  • the method for capturing an image file by the first device is different from the method for capturing an image by the device in the conventional solution. Specifically, the first device not only acquires image data captured by the camera, but also acquires image generation information when the image data is captured, and then generates an image file including the image data and the image generation information.
  • the image generation information may include a shooting parameter (referred to as a second shooting parameter) when the camera captures image data.
  • the second shooting parameters described above may include information of a shooting mode (such as a panoramic mode and a normal mode), a shooting scene (such as a human shooting scene, a building shooting scene, a natural scenery shooting scene, an indoor shooting scene, and an outdoor shooting scene, etc.) Information and camera type (camera type indicates that the image data is captured by the front camera or the rear camera).
  • the first device may determine information such as the shooting mode information, the shooting scene information, and the camera type, in response to the selection of the shooting mode, the shooting scene, and the front camera or the rear camera when the camera captures the image data.
  • the normal mode in the embodiment of the present application refers to a mode in which a photo is taken using a rear camera.
  • the image generation information further includes character feature information, where the character feature information includes a number of faces, face indication information, face position information, and indications of other objects (such as animals). Information such as the number of information and other objects.
  • the face indication information is used to indicate that the image data of the first image file includes a face or does not include a face; the indication information of the other object is used to indicate that the image data includes other objects or does not include other objects; Used to indicate the position of the face in the image data.
  • the second shooting parameter in the embodiment of the present application is different from the first shooting parameter saved in the EXIF field 301 of the EXIF image shown in FIG. 3.
  • the first shooting parameter can only be saved in the image without recording the second shooting parameter in the embodiment of the present application; and the second shooting parameter can be used to perform image classification on the image. operating.
  • the first device may generate a first image file including the image data and the second shooting parameter when the image data of the first image file is captured.
  • the image classification operation when the image classification operation is performed on the image, the image classification operation can be directly read from the first image file and performed using the second imaging parameter, and the calculation amount when the image classification operation is performed on the image can be reduced, thereby improving the image. Classification efficiency.
  • the first image parameter such as an EXIF image file
  • the first shooting parameter is saved in the EXIF field of the EXIF image file.
  • FIG. 6 is a schematic diagram showing the principle of generating an image file including feature information of image data when an image is captured according to an embodiment of the present application.
  • the camera engine can call an algorithm such as a scene algorithm and a face algorithm when the camera captures an image (ie, 61), and recognizes a user operation when the camera captures image data (ie, 62) to collect image generation of the image.
  • the collected image generation information and the image captured by the camera are passed to the JPEG creator 64; the image generation information from 63 is packed into a byte array by the MakerNote Maker in the JPEG Maker 64 (referred to as The feature byte array), the image from 61 is packed into a byte array by the EXIF maker in the JPEG maker 64; then, the image file including the image data and the above-described feature byte array is generated by the JPEG maker 64 (ie, An image file).
  • the first device may periodically perform the following S502 to perform image classification on the plurality of image files including the first image file.
  • the first device is the mobile phone 100 shown in (a) of FIG. 7A.
  • the photo album of the mobile phone 100 includes photos 1 to 8 and the like, and the first image file is any photo in the album of the mobile phone 100, such as the first image file is FIG. 7A.
  • the mobile phone 100 can periodically perform image classification on photos in the album of the mobile phone 100.
  • the mobile phone 100 can display the album interface shown in (b) of FIG. 7A, in which the mobile phone 100 displays the result of image classification of the photos in the album.
  • the mobile phone 100 divides the photos 1 - 8 into “person” album b, "animal” album a, and "landscape” album c.
  • the "person” album b includes the photo 1, the photo 3, the photo 5, and the photo 8 shown in (a) of FIG. 7A
  • the "animal" photo album a includes the one shown in (a) of FIG. 7A
  • Photo 2 and Photo 7 includes Photo 4 and Photo 6 shown in (a) of Fig. 7A.
  • the mobile phone 100 can display the "person” shown in (c) of FIG. 7A.
  • the "People" album interface includes Photo 1, Photo 3, Photo 5, and Photo 8.
  • the first device may perform image classification on the pictures in the album of the first device by performing S502 in response to the user operation.
  • the mobile phone 100 can also perform image classification on the photos 1 - 8 in response to the user's click operation on the "alliance" button shown in (a) of FIG. 7A, and then display the image in FIG. 7A.
  • the first device performs image classification operation on the first image file by using image generation information.
  • the image generation information is not obtained by the first device performing an image recognition operation on the image data, that is, the first device does not perform an image recognition operation on the image data in order to obtain the image generation information. That is, the first device may skip the following steps: performing an image recognition operation on the image data, analyzing the image data to obtain image generation information, and directly using the saved image generation information in the first image file to perform execution on the first image file. Image classification operation.
  • the image classification algorithm adopted by the first device to analyze the image data to obtain different feature information is different.
  • the image classification algorithm used by the first device to analyze the image data to obtain the image generation information includes the first algorithm. In this way, the first device does not perform an image recognition operation on the image data by using the first algorithm, and analyzes the image data to obtain image generation information corresponding to the first algorithm.
  • the first algorithm in the embodiment of the present application may include one or more image classification algorithms.
  • the image generation information in the embodiment of the present application may include feature information of one or more attributes, and the feature information of each attribute corresponds to an image classification algorithm.
  • the device displays the first image file in a category directory of the gallery in response to the operation for viewing the gallery.
  • the image classification directory in the embodiment of the present application may display the first image file according to the classification result obtained by executing S502.
  • the mobile phone 100 may also display the photo 1 - photo 8 in a responsive manner to the user's click operation on the "alliance" button shown in (a) of FIG. 7A.
  • the album interface shown in (b) of 7A ie, the catalogue of the gallery).
  • the foregoing operation for querying the gallery may be that the user inputs a keyword in a search box of the gallery, and the device may input the keyword in the search box of the gallery in response to the user, and display the first image file in the category directory of the gallery. Multiple image files that match the keywords entered by the user.
  • the mobile phone 100 performs the image classification operation on the image file (such as photo 1 - photo 8) by executing the above S501-S502. .
  • the mobile phone 100 can display the character image files of the photo 1, the photo 3, the photo 5, and the photo 8 in the catalogue of the gallery.
  • the mobile phone 100 can display the character image files of the photo 3 and the photo 5 in the catalogue of the gallery.
  • the image file captured by the first device includes not only image data, but also image generation information.
  • the first device can directly perform image classification operation on the first image file by using the image generation information; without performing image recognition operation on the image data to analyze the image data to obtain image generation information, the image classification process can be reduced.
  • the amount of calculation can further improve the efficiency of image classification.
  • the feature information required for the first device to perform the image classification operation includes not only the image generation information but also the classification feature information (the feature information obtained by performing the image recognition operation on the image data, and the classification feature information is different from the image generation information) Therefore, before the first device performs an image classification operation on the first image file, the first device may further perform an image recognition operation on the image data to analyze the image data to obtain classification feature information; and then use the image generation information and the classification feature information. And performing an image classification operation on the first image file.
  • the foregoing S502 may include S701-S702:
  • the first device performs an image recognition operation on the image data to analyze the image data to obtain classification feature information.
  • the first device may perform image recognition operations on the image data by using different image classification algorithms (such as the second algorithm) different from the foregoing first algorithm to analyze the image data to obtain classification feature information corresponding to the second algorithm.
  • the second algorithm is different from the first algorithm described above, and the classification feature information is different from the image generation information.
  • the method for performing the image recognition operation on the image data by the first device to obtain the classification feature information by using the second algorithm may refer to the method for performing the image recognition operation on the image data to obtain the classification feature information in the conventional technology, which is not described herein. .
  • the first device performs image classification operation on the first image file by using image generation information and classification feature information.
  • the method for performing an image classification operation on the first image file by using the image generation information and the classification feature information by the first device may refer to a method for performing an image classification operation on the image file according to the feature information of the image file in the conventional technology. The examples are not described here.
  • the method in the embodiment of the present application further includes S703:
  • the first device saves the classification feature information in the first image file to obtain the updated first image file.
  • the image generation information and the classification feature information are included in the first image file.
  • the image generation information and the classification feature information are collectively referred to as feature information of the first image file.
  • the feature information (image generation information and classification feature information) in the embodiment of the present application is saved in a preset field of the first image file.
  • the Maker Note field 302 shown in FIG. 3 is used as an example to describe the format of the preset field and the manner in which the feature information is saved in the preset field:
  • the feature information in the embodiment of the present application may be saved in the Maker Note field by using TIFF.
  • the data format for storing the feature information in the Maker Note field 302 includes, but is not limited to, TIFF. Other data formats for storing the feature information in the Maker Note field 302 are not described herein.
  • the Maker Note field 302 includes an information header 302a, a check field 302b, a Tagged Image File Format (TIFF) header 302c, and a TIFF field 302d.
  • TIFF Tagged Image File Format
  • the information header 302a is used to store vendor information. For example, "huawei" may be saved in the information header 302a; the verification field 302b is used to store verification information, which identifies the integrity and accuracy of the information held in the Maker Note field 302, for example, the verification information may It is a Cyclic Redundancy Check (CRC).
  • the TIFF header 302c is configured to save TIFF indication information for indicating that the format of the feature information stored in the TIFF field 302d is an Image File Directory (IFD) format.
  • the TIFF field 302d is used to hold feature information such as image generation information and classification feature information.
  • the device performs an image classification operation on the image, and after obtaining new feature information (ie, classification feature information), the feature information saved in the Maker Note field 302 can be updated (ie, the Maker Note field 302 is modified).
  • new feature information ie, classification feature information
  • the feature information saved in the Maker Note field 302 can be updated (ie, the Maker Note field 302 is modified).
  • the device may be saved in the update Maker Note field 302.
  • new check information is generated for the check field 302b.
  • FIG. 8 is a schematic diagram showing an example of a data structure of a Maker Note field provided by an embodiment of the present application.
  • the format in which the feature information is saved in the TIFF field 302d in FIG. 8 is the IFD format.
  • one or more IFDs may be saved in the TIFF field 302d.
  • IFD0 and IFD1 are included in the TIFF field 302d.
  • IFD0 the IFD information in the TIFF field 302d is described:
  • IFD0 includes a directory field and a data field
  • the directory field of IFD0 is used to store a directory of sub-IFDs (such as sub-IFD1 and sub-IFD2) in IFD0 and a connection end tag of the IFD0.
  • the data field of IFD0 is used to store sub-IFDs (such as sub-IFD1 and sub-IFD2, etc.).
  • the connection end tag of IFD0 is used to indicate the location where IFD0 ends.
  • the feature information in the embodiment of the present application may be saved in a directory or may be saved in a data domain.
  • each sub-IFD may also include a directory domain and a data domain.
  • the sub-IFD1 in IFD0 includes a directory domain and a data domain.
  • the function of the directory domain and the data domain of the sub-IFD1 reference may be made to the description of the directory domain and the data domain of the IFD in the embodiment of the present application.
  • FIG. 9 shows a schematic structural diagram of a directory of the IFD shown in FIG.
  • the directory of the IFD includes a plurality of tag items, and each tag item includes a tag identifier (Identity, ID), a tag type, and a tag value.
  • the tag value in the embodiment of the present application may be feature information; or, the feature information is stored in a data domain of the IFD, and the tag value is an address offset of the feature information in the data domain.
  • the tag value is the feature information; when a feature information is greater than 4 bytes, the feature information needs to be saved in the data domain, and the tag value is the feature information in the data.
  • the address offset of the domain when a feature information is less than or equal to 4 bytes, the tag value is the feature information; when a feature information is greater than 4 bytes, the feature information needs to be saved in the data domain, and the tag value is the feature information in the data.
  • the address offset of the domain when a feature information is less than or equal to 4 bytes, the tag value is the feature information; when a feature information is greater than 4 bytes, the feature information needs to be saved in the data domain, and the tag value is the feature information in the data.
  • the tag IDs of the three tag entries are 0x001, 0x002, 0x003, and 0x004, respectively.
  • the tag type corresponding to the tag ID 0x001 is Unsigned long, and the tag value is used to indicate the shooting mode information of the image (for example, when the tag value is 0, the image is taken in the self-timer mode; when the tag value is 1, Indicates that the image was taken in panorama mode).
  • the tag type corresponding to the tag ID0x002 is Unsigned byte, and its tag value is used to indicate the camera type of the image (for example, when the tag value is 0, it indicates that the image was taken using the rear camera; when the tag value is 1, the image is Shot with the front camera).
  • the label type corresponding to the label ID0x003 is Undefined, and the label value is used to indicate the face indication information (for example, when the label value is 0, it means that there is no face in the image; when the label value is 1, it indicates a human face in the image).
  • the tag type corresponding to tag ID 0x004 is Unsigned byte, and its tag value is address offset 1, which is the address offset of the face location information in the data field of IFD0.
  • the feature information that the first device needs to use when performing the image classification operation on the first image file may include the feature information of the preset multiple attributes.
  • the first device may use different algorithms to identify image data in the first image file to obtain feature information of the corresponding attribute.
  • the "preset multiple attributes" in the embodiment of the present application is determined by an image classification client (referred to as a client) in the first device. Specifically, the “preset multiple attributes” is determined by the attribute of the feature information that needs to be identified when the image classification client in the first device performs an image classification operation on the image.
  • the attributes of the feature information that the client of the first device needs to recognize when performing an image classification operation on the image file include: a face attribute, a scene attribute, and a mode attribute.
  • the face attribute corresponds to the number of faces and the face indication information
  • the scene attribute corresponds to the shooting scene information
  • the mode attribute corresponds to the shooting mode information.
  • the preset plurality of attributes include a face attribute, a scene attribute, and a mode attribute.
  • the feature information of each attribute corresponds to an image classification algorithm.
  • the feature information of the face attribute corresponds to the face algorithm.
  • the feature information of an attribute may be saved in the sub-IFD of an IFD.
  • the feature information of the face attribute may include: a version of the face algorithm, a number of faces, and face position information. Assume that IFD0 includes three sub-IFDs (such as sub-IFD1-sub-IFD3).
  • FIG. 10 shows the structure of the directory of the sub-IFD in the IFD0 shown in FIG.
  • the directory of the sub-IFD in the IFD includes a plurality of tag items, and each tag item includes a tag ID, a tag type, and a tag value.
  • the sub-IFD1 of IFD0 it is assumed that the sub-IFD1 of IFD0 includes three tag items, and the tag IDs of the three tag items are 0x001, 0x002, and 0x003, respectively.
  • the tag type corresponding to the tag ID 0x001 is Unsigned long, and the tag value is used to indicate the version of the face algorithm; the tag type corresponding to the tag ID 0x002 is Unsigned long, and the tag value is used to indicate the number of faces.
  • the tag type corresponding to the tag ID 0x003 is Unsigned byte, and the tag value is the address offset 2, which is the address offset of the face location information in the data field of the sub-IFD1 of the IFD0.
  • the tag IDs in the tag entries in different IFDs in this embodiment may be the same. Specifically, since the identifiers (such as IDs) of different IFDs are different, even if the label items in the two IFDs use the same label ID, the device can distinguish the label items in different IFDs. Also, the tag IDs in the tag entries in different sub-IFDs may be the same. Specifically, since the identifiers (such as IDs) of different sub-IFDs are different, even if the label items in the two sub-IFDs use the same label ID, the device can distinguish the label items in different sub-IFDs. Moreover, the tag types in the embodiments of the present application include, but are not limited to, the Unsigned long, the Unsigned byte, and the Undefined.
  • a tag item, an IFD or a sub-IFD may be added in the TIFF field 302d for saving the feature information of the new attribute.
  • IFD2 is added to the TIFF field 302d shown in FIG.
  • FIG. 11 is a schematic diagram of a principle for performing an image classification operation according to an embodiment of the present application.
  • the image classification engine may first read the feature information saved in the Maker Note field of the image file, and after reading the feature information, the image is parsed by Maker Note.
  • the image classification algorithm ie, 1102
  • the image classification operation ie, 1103
  • the image classification engine further
  • the new feature information 1104 can be used to update the feature information (ie, 1105) stored in the Maker Note field of the image file to obtain an updated image file.
  • the first device may acquire the image file before performing the image classification operation on the image file.
  • the method in this embodiment of the present application includes S1200:
  • the first device acquires the first image file.
  • the manner in which the first device acquires the first image file includes, but is not limited to, the manner shown in the above S501, and the first device may further receive the image file sent by the second device. That is, S1200 may include S1200a: the first device receives the first image file sent by the second device. Wherein, in different implementation manners (implementation manners a-d), the first image file received by the first device from the second device is different:
  • Implementation mode a The second device captures the first image file by capturing an image file as shown in S501.
  • the first device receives image generation information from the first image file of the second device.
  • Implementation b the second device captures the first image file by using the captured image file shown in S501; and the second device performs the image classification operation on the first image file by performing the image classification method provided by the embodiment of the present application. . After the second device performs the image classification operation on the first image file, the classification feature information of the image data in the first image file is saved in the first image file. That is, the first device receives the image generation information and the classification feature information from the first image file of the second device.
  • Implementation c The second device does not have the function of capturing an image file in the manner shown in S501, and the first device does not include the image generation information in the first image file received from the second device, and does not include the classification feature information.
  • the second device does not have the function of capturing the image file in the manner shown in S501; however, the second device performs the image classification operation on the first image file by performing the image classification method provided by the embodiment of the present application. After the second device performs an image classification operation on the first image file, the second image file includes classification feature information, and does not include image generation information.
  • the first device may first read Feature information saved in the first image file; when it is determined that the first feature information (image generation information and/or classification feature information) is stored in the first image file, the image recognition operation may be performed on the image data without using the third algorithm And analyzing the image data to obtain first feature information corresponding to the third algorithm; and directly performing image classification operation on the first image file by using the first feature information.
  • the first feature information image generation information and/or classification feature information
  • the device can skip the recognition of the image data by using the third algorithm to analyze the image data to obtain the first feature information, and directly perform the image classification operation on the first image file by using the first feature information, thereby reducing the calculation amount of performing the image classification operation.
  • the method in the embodiment of the present application further includes S1201-S1205.
  • the method of the embodiment of the present application further includes S1201-S1205:
  • S1201 The first device acquires feature information in the first image file.
  • the feature information (such as image generation information and classification feature information) in the embodiment of the present application is saved in a preset field of the first image file (such as a Maker Note field).
  • a preset field of the first image file such as a Maker Note field.
  • S1202 The first device determines whether the first feature information is included in the first image file.
  • the first device may not adopt the first feature information.
  • the three algorithms recognize the image data to obtain the first feature information (ie, skip S1203), and directly perform the image classification operation using the first feature information (ie, perform S1205).
  • the first device may adopt the third algorithm.
  • the image data in the first image file is identified to obtain the first feature information (ie, execution S1203), and then the image classification operation is performed using the first feature information obtained in S1203 (ie, execution S1205).
  • the first feature information may be feature information of the first attribute
  • the third algorithm is an image classification algorithm for identifying feature information of the first attribute.
  • the feature information of an image can be divided into the feature information of the attribute a and the feature information of the attribute b according to the attribute of the feature information; then the plurality of preset attributes may include: the attribute a and the attribute b.
  • the feature information of one image may be classified into feature information of a shooting attribute and feature information of a face attribute according to attributes of the feature information.
  • the preset attribute may include: attribute a-sub Attribute 1, attribute a-sub attribute 2 and attribute b.
  • the feature information of the shooting attribute may include shooting mode information and shooting scene information, etc.; the feature information of the face attribute may be divided into: face indication information, a version of the face algorithm, and a number of faces.
  • the Maker Note field of the first image file may save the feature information of the image data according to different attributes. For example, as shown in FIG. 8, the feature information of one attribute is stored in one IFD, and the attribute information of the feature information stored in different IFDs is different.
  • the IFD0 shown in FIG. 8 can be used to save feature information of shooting attributes such as the above-described shooting mode information and shooting scene information, and the shooting mode information is saved in the sub-IFD1 in the IFD0, and the shooting scene information is saved in the sub-IFD2 in the IFD0;
  • the IFD1 shown in 8 can be used to save the feature information of the face attribute (the version of the face algorithm, the number of faces and the face position information, etc.), and the version of the face algorithm is saved in the child IFD1 in the IFD1, in the IFD1.
  • the number of faces is saved in the child IFD2, and the face position information is saved in the child IFD3 in the IFD1.
  • each IFD saves the feature information of the tag corresponding to an attribute.
  • multiple tags can be saved in each IFD, and each tag includes a tag ID, a tag type, and a tag value.
  • the tag corresponding to the first attribute may not be included in the IFD of the TIFF field.
  • the feature information of the first attribute may not be saved by setting the label value of the feature information of the first attribute to be empty (such as Null).
  • the first device uses a third algorithm to identify image data in the first image file to obtain first feature information.
  • the method for identifying the image data of the first image file by using the image classification algorithm (such as the third algorithm) to obtain the first feature information may refer to the image classification operation when the device performs the image classification operation on the image in the conventional technology.
  • the method for identifying the feature information of the image data by the algorithm is not described herein again in the embodiment of the present application.
  • the first device saves the first feature information in the first image file to obtain the updated first image file.
  • the attribute of the feature information saved by each IFD may be pre-agreed.
  • the tag ID of each IFD corresponds to the feature information of one attribute; therefore, the first device may save the feature information of the first attribute in the Maker Note.
  • the tag value corresponding to the tag ID of the first attribute.
  • the first device performs an image classification operation on the first image file by using the first feature information.
  • the method for performing an image classification operation on the first image file by using the first feature information by the first device may refer to a method for performing an image classification operation on the image file according to the feature information of the image file in the conventional technology. Let me repeat.
  • the principle of performing the image classification operation provided by the embodiment of the present application, reference may be made to the schematic diagram shown in FIG. 11 , which is not repeatedly described herein.
  • the first device when performing the image classification operation on the first image file, the first device may first acquire the feature information in the first image file, and determine whether the first feature information is included in the first image file; When the first feature information is included in the first image file, the image data of the first image file may be skipped by using the third algorithm to obtain the first feature information. In this way, the amount of calculation in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the version of the algorithm used by the device to perform the image classification operation is continuously updated with time, and the feature information obtained by using the same algorithm of different versions to identify the image data of the first image file is different.
  • the classification feature information further includes a version of the image classification algorithm.
  • the algorithm version identifying the first feature information is not necessarily the same as the version of the third algorithm.
  • the method of the embodiment of the present application further includes S1301, and the S1204 may be replaced by S1204a:
  • the first device determines whether the algorithm version identifying the first feature information is the same as the version of the third algorithm.
  • the first device may skip using the third algorithm to identify the image data in the first image file to obtain the first feature information (ie, skipping S1203), performing an image classification operation on the first image file directly by using the first feature information (ie, executing S1205).
  • the first device may identify the image data by using the third algorithm to obtain the first feature information (ie, execute S1203), and then use the method obtained by executing S1203.
  • a feature information performs an image classification operation on the first image file (ie, execution S1205).
  • S1204a The first device uses the first feature information to update the saved first feature information in the first image file to obtain the updated first image file.
  • the method for saving the feature information in the first image file by the first device is: the first device adds the first feature to the preset field of the first image file. information.
  • the method for the first device to update the feature information saved in the first image file is: the first device
  • the saved first feature information in the preset field of the first image file is replaced with the identified first feature information.
  • the algorithm version for identifying the first feature information is different from the version of the third algorithm, and may be divided into two cases: (1) the algorithm version identifying the first feature information is lower than the version of the third algorithm; and (2) identifying the first The algorithm version of a feature information is higher than the version of the third algorithm.
  • the method of the embodiment of the present application further includes S1401:
  • the first device determines whether an algorithm version that identifies the first feature information is lower than a version of the third algorithm.
  • the first device may use the third algorithm with a higher version to identify the image data in the first image file to obtain the feature of the first attribute.
  • the information ie, S1203 is performed
  • the image classification operation is performed on the first image file using the first feature information obtained in S1203 (ie, S1205 is performed).
  • the first device When the algorithm version of the first feature information is higher than the version of the third algorithm, the first device does not need to use the third version of the lower algorithm to identify the image data to obtain the feature information of the first attribute, and may skip the third algorithm.
  • the image data is identified to obtain the feature information of the first attribute (ie, skipping S1203), and the image classification operation is performed on the first image file directly using the first feature information (ie, execution S1205).
  • the first device may update the feature information saved in the preset field by using the feature information identified by the version updated algorithm. In this way, when the image classification operation is performed on the image again, the updated feature information saved in the preset field can be directly used, the calculation amount in the image classification process can be reduced, and the image classification efficiency can be improved.
  • the first device and the second device and the like described above include hardware structures and/or software modules corresponding to each function.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
  • the embodiment of the present application may perform the division of the function module on the first device according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • the device 1300 is the first device in the foregoing method embodiment.
  • the device 1300 includes an acquisition unit 1301, a classification unit 1302, and a display unit 1303.
  • the obtaining unit 1301 is configured to support the device 1300 to perform S501, S1200, S1201 in the foregoing method embodiments, and/or other processes for the techniques described herein.
  • the foregoing classification unit 1302 is configured to support the device 1300 to perform S502, S701, S702, S1203, S1205 in the foregoing method embodiments, and/or other processes for the techniques described herein.
  • the above display unit 1303 is used to support the device 1300 to perform S503 in the above method embodiments, and/or other processes for the techniques described herein.
  • the above device 1300 further includes an update unit.
  • the update unit is configured to support the device 1300 to perform S703, S1204, S1204a in the above method embodiments, and/or other processes for the techniques described herein.
  • the above device 1300 further includes a determining unit.
  • the determining unit is configured to support the device 1300 to perform S1202, S1301, S1401 in the above method embodiments, and/or other processes for the techniques described herein.
  • the above device 1300 may also include other unit modules.
  • the above device 1300 further includes: a storage unit.
  • the storage unit is for saving the first image file.
  • the first image file may be saved in a cloud server, and the device 1300 may perform an image classification operation on the image file in the cloud server.
  • the above device 1300 may further include: a transceiver unit.
  • the device 1300 can interact with other devices through a transceiver unit.
  • the device 1300 can transmit an image file to other devices through the transceiver unit, or receive an image file sent by other devices.
  • the obtaining unit 1301 and the classifying unit 1302 and the like may be integrated into one processing module.
  • the transceiver unit may be an RF circuit, a WiFi module or a Bluetooth module of the device 1300, and the storage unit may be the device 1300.
  • the display unit 1303 may be a display module such as a display (touch screen).
  • FIG. 14 is a schematic diagram showing a possible structure of a terminal involved in the above embodiment.
  • the device 1400 includes a processing module 1401, a storage module 1402, and a display module 1403.
  • the processing module 1401 is configured to perform control management on the device 1400.
  • the display module 1403 is configured to display classification results of image files and image files.
  • the storage module 1402 is configured to save program code and data of the device 1400.
  • the device 1400 described above may also include a communication module 1404 for communicating with other devices.
  • the communication module 1404 is used to receive or send a message or image file to other devices.
  • the processing module 1401 may be a processor or a controller, and may be, for example, a CPU, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), and field programmable. Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 1404 can be a transceiver, a transceiver circuit, a communication interface, or the like.
  • the storage module 1402 can be a memory.
  • the processing module 1401 is a processor (such as the processor 101 shown in FIG. 1)
  • the communication module 1404 is a radio frequency circuit (such as the radio frequency circuit 102 shown in FIG. 1)
  • the storage module 1402 is a memory (such as the memory shown in FIG. 1).
  • the display module 1403 is a touch screen (including the touch panel 104-1 and the display panel 104-2 shown in FIG. 1 )
  • the device provided by the present application may be the mobile phone 100 shown in FIG. 1 .
  • the 1404 may include not only a radio frequency circuit but also a WiFi module and a Bluetooth module.
  • the communication modules such as the radio frequency circuit, the WiFi module, and the Bluetooth module may be collectively referred to as a communication interface, wherein the processor, the communication interface, the touch screen, and the memory may be coupled through a bus. together.
  • the embodiment of the present application further provides a control device, including a processor and a memory, where the memory is used to store computer program code, where the computer program code includes computer instructions, when the processor executes the computer instruction,
  • a control device including a processor and a memory
  • the memory is used to store computer program code
  • the computer program code includes computer instructions, when the processor executes the computer instruction
  • the embodiment of the present application further provides a computer storage medium, where the computer program code is stored, and when the processor executes the computer program code, the device performs the related method steps in FIG. 5 or FIG. 12 to implement the foregoing embodiment.
  • the method in in .
  • the embodiment of the present application further provides a computer program product, when the computer program product is run on a computer, causing the computer to perform the related method steps in FIG. 5 or FIG. 12 to implement the method in the foregoing embodiment.
  • the device 1300 and the device 1400, the computer storage medium or the computer program product provided by the present application are all used to perform the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the corresponding ones provided above. The beneficial effects in the method are not described here.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a flash memory, a mobile hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Studio Devices (AREA)

Abstract

La présente invention appartient au domaine du traitement d'image. L'invention concerne un procédé et un dispositif de classification d'images capables de réduire une charge de calcul dans un processus de classification d'images et d'améliorer l'efficacité de classification d'images. Le procédé comprend les étapes suivantes : un premier dispositif capture des données d'image, acquiert des informations de génération d'images lors de la capture des données d'image, et génère un premier fichier d'image comprenant les données d'image et les informations de génération d'images (S501) ; le premier dispositif effectue, sur la base des informations de génération d'images, une opération de classification d'images sur le premier fichier d'image (S502) ; et en réponse à une opération pour visualiser une galerie, le dispositif affiche le premier fichier d'image dans un répertoire de classification de la galerie (S503).
PCT/CN2018/076081 2018-02-09 2018-02-09 Procédé et dispositif de classification d'images WO2019153286A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/076081 WO2019153286A1 (fr) 2018-02-09 2018-02-09 Procédé et dispositif de classification d'images
CN201880085333.5A CN111566639A (zh) 2018-02-09 2018-02-09 一种图像分类方法及设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/076081 WO2019153286A1 (fr) 2018-02-09 2018-02-09 Procédé et dispositif de classification d'images

Publications (1)

Publication Number Publication Date
WO2019153286A1 true WO2019153286A1 (fr) 2019-08-15

Family

ID=67549189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076081 WO2019153286A1 (fr) 2018-02-09 2018-02-09 Procédé et dispositif de classification d'images

Country Status (2)

Country Link
CN (1) CN111566639A (fr)
WO (1) WO2019153286A1 (fr)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191522A (zh) * 2019-12-11 2020-05-22 武汉光庭信息技术股份有限公司 图像场景信息存储方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986096A (zh) * 2021-12-29 2022-01-28 北京亮亮视野科技有限公司 一种交互方法、装置、电子设备和存储介质
CN115327562A (zh) * 2022-10-16 2022-11-11 常州海图信息科技股份有限公司 一种手持可视激光测距仪器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1955909A (zh) * 2005-10-26 2007-05-02 奥林巴斯映像株式会社 图像管理装置和图像管理方法
US20100157096A1 (en) * 2008-12-18 2010-06-24 Samsung Electronics Co., Ltd Apparatus to automatically tag image and method thereof
CN103685815A (zh) * 2012-09-20 2014-03-26 卡西欧计算机株式会社 图像分类装置、电子相册制作装置、图像分类方法及程序
CN108235765A (zh) * 2017-12-05 2018-06-29 华为技术有限公司 一种故事相册的显示方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824859A (zh) * 2015-01-09 2016-08-03 中兴通讯股份有限公司 图片分类方法、装置及智能终端
CN105138578A (zh) * 2015-07-30 2015-12-09 北京奇虎科技有限公司 目标图片分类存储方法及其终端
CN105302872A (zh) * 2015-09-30 2016-02-03 努比亚技术有限公司 图像处理装置和方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1955909A (zh) * 2005-10-26 2007-05-02 奥林巴斯映像株式会社 图像管理装置和图像管理方法
US20100157096A1 (en) * 2008-12-18 2010-06-24 Samsung Electronics Co., Ltd Apparatus to automatically tag image and method thereof
CN103685815A (zh) * 2012-09-20 2014-03-26 卡西欧计算机株式会社 图像分类装置、电子相册制作装置、图像分类方法及程序
CN108235765A (zh) * 2017-12-05 2018-06-29 华为技术有限公司 一种故事相册的显示方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191522A (zh) * 2019-12-11 2020-05-22 武汉光庭信息技术股份有限公司 图像场景信息存储方法及系统

Also Published As

Publication number Publication date
CN111566639A (zh) 2020-08-21

Similar Documents

Publication Publication Date Title
US9584694B2 (en) Predetermined-area management system, communication method, and computer program product
US20110184980A1 (en) Apparatus and method for providing image
KR101485458B1 (ko) 개체 정보를 포함하는 화상 파일 생성 방법 및 장치
EP3706015A1 (fr) Procédé et dispositif permettant d'afficher un album d'histoire
CN114127713A (zh) 一种图像显示方法与电子设备
CN110059686B (zh) 字符识别方法、装置、设备及可读存储介质
WO2018184260A1 (fr) Procédé et dispositif de correction pour image de document
EP3131302A2 (fr) Procédé et dispositif de génération de contenu vidéo
WO2019153286A1 (fr) Procédé et dispositif de classification d'images
CN111125601B (zh) 文件传输方法、装置、终端、服务器及存储介质
WO2019169587A1 (fr) Procédé d'installation d'application selon des modules fonctionnels
CN103916940A (zh) 一种获取拍照位置的方法及装置
US20220215050A1 (en) Picture Search Method and Device
CN104798065A (zh) 使能元数据存储子系统
US20150019579A1 (en) Method for an electronic device to execute an operation corresponding to a common object attribute among a plurality of objects
CN115115679A (zh) 一种图像配准方法及相关设备
US11238622B2 (en) Method of providing augmented reality contents and electronic device therefor
KR20160038563A (ko) 하나 이상의 이미지들을 추천하는 방법 및 그를 위한 전자 장치
KR20150027934A (ko) 다각도에서 촬영된 영상을 수신하여 파일을 생성하는 전자 장치 및 방법
CN110532474B (zh) 信息推荐方法、服务器、系统以及计算机可读存储介质
CN114842069A (zh) 一种位姿确定方法以及相关设备
US20120154605A1 (en) Wireless data module for imaging systems
WO2021244614A1 (fr) Procédé et système de recherche de contenu de stockage et dispositif électronique
KR20100101960A (ko) 디지털 카메라, 사진 분류 시스템 및 방법
US11202107B2 (en) Method and apparatus for providing task based multimedia data

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18905541

Country of ref document: EP

Kind code of ref document: A1