WO2022127609A1 - 图像处理方法及电子设备 - Google Patents

图像处理方法及电子设备 Download PDF

Info

Publication number
WO2022127609A1
WO2022127609A1 PCT/CN2021/135041 CN2021135041W WO2022127609A1 WO 2022127609 A1 WO2022127609 A1 WO 2022127609A1 CN 2021135041 W CN2021135041 W CN 2021135041W WO 2022127609 A1 WO2022127609 A1 WO 2022127609A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
electronic device
images
user
group
Prior art date
Application number
PCT/CN2021/135041
Other languages
English (en)
French (fr)
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 US18/267,260 priority Critical patent/US20240046504A1/en
Priority to EP21905538.1A priority patent/EP4246426A4/en
Publication of WO2022127609A1 publication Critical patent/WO2022127609A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30242Counting objects in image

Definitions

  • the present application relates to the technical field of image processing, and in particular, to an image processing method and an electronic device.
  • the electronic device can provide the function of eliminating moving objects in the photo.
  • the user can turn on a specific shooting mode of the electronic device, and shoot multiple frames of images (for example, a 1.7-second video) in the specific shooting mode, and the electronic device can eliminate passers-by based on the multiple frames of images and fill in the passers-by after eliminating passers-by. area, but this method is not convenient enough, and the electronic device cannot process a single photo taken by the user through the default shooting mode of the electronic device.
  • a specific shooting mode of the electronic device for example, a 1.7-second video
  • the user can select a certain person in the single photo to eliminate, wherein the image content used to fill the area after eliminating the person is the electronic device through artificial intelligence ( Artificial intelligence, AI) and other technologies are guessed, and the guessed image content and the surrounding environment are easily different, and the authenticity is low.
  • artificial intelligence Artificial intelligence, AI
  • the embodiments of the present application disclose an image processing method and an electronic device, which can eliminate moving objects in an image in a general scene, which is convenient for users to use, and the authenticity of the image after the moving objects is eliminated is high.
  • an embodiment of the present application provides an image processing method, which is applied to an electronic device.
  • the method includes: determining multiple images that meet a first condition, where the first condition includes: any one of the multiple images The degree of similarity between the two images is greater than or equal to a first threshold, and the multiple images include at least two images; a first image that satisfies the second condition is determined from the multiple images, and the first image includes the first image.
  • the first object is the object to be eliminated in the first image
  • a second image is determined from the plurality of images, the second image includes a second object, and the second object is in the The position in the second image corresponds to the position of the first object in the first image; the second object is used to cover or replace the first object to obtain the target image.
  • the electronic device may remove the first object based on multiple images, and any two images in the multiple images have a relatively high degree of similarity. Any one of the multiple images can be obtained by shooting in the default shooting mode of the electronic device, instead of being obtained through a specific shooting mode, the user is more convenient to use and has a wide range of application scenarios. Moreover, the second object used to cover or replace the first object is obtained according to the real second image, so the consistency between the target image and the real world is higher, the display effect is better, and the user experience is improved.
  • the first condition further includes at least one of the following: the shooting time of any one of the multiple images is within a first range, and any one of the multiple images is within a first range. The location where the image was taken is within the second range.
  • the electronic device can not only determine the plurality of images for realizing the elimination of the first object according to the similarity of the images, but also can determine the above-mentioned plurality of images according to the shooting time and/or shooting location of the images, further ensuring that The obtained multiple images belong to the same shooting scene. Elimination of the first object based on such multiple images can improve the authenticity of the target image and provide a better user experience.
  • the method before the determining of multiple images that meet the first condition, the method further includes: receiving a first operation, where the first operation is used to select the multiple images.
  • the user can select multiple images for realizing the elimination of the first object, which is more flexible, and the obtained target image is also more in line with the user's needs, and the user experience is better.
  • the second condition includes at least one of the following: the sharpness of the subject in the first image is greater than or equal to a second threshold, and in the first image the sharpness of the subject is greater than or equal to a second threshold.
  • the number of objects other than the photographed subject is less than a third threshold, and a second operation is received for selecting the first image.
  • the first image used to obtain the target image needs to satisfy the second condition, for example, the definition of the photographed subject is relatively high, and the number of other objects other than the photographed subject is small. Therefore, the display effect of the photographed subject in the obtained target image is also better, and the user experience is better.
  • the second image is an image other than the first image among the multiple images, and the degree of similarity between the second image and the first image is greater than or equal to Fourth threshold.
  • the second image may be an image with a higher degree of similarity to the first image among the multiple images.
  • the electronic device uses the second object in the second image to cover or replace the first object in the first image, the display effect of the obtained target image will be better, and the user experience will also be better.
  • the method further includes: determining, from the plurality of images, the photographed subject that satisfies a third condition; the third condition includes at least one of the following: the plurality of images The sharpness of the photographed subject in any one of the images is greater than or equal to the fifth threshold, the focus point of any one of the multiple images is located in the area where the photographed subject is located, and the multiple images The area of the photographed subject in any one of the images is greater than or equal to a sixth threshold, the photographed subject belongs to a preset category, and a third operation is received, and the third operation is used to select the photographed subject .
  • the electronic device can flexibly select the way to determine the subject to be photographed according to its own capabilities, and has a wide range of application scenarios. For example, when the processing capability is strong, the electronic device may superimpose multiple methods to determine the subject to be photographed, so that the determined subject to be photographed more meets the user's needs.
  • the method further includes: receiving a fourth operation, where the fourth operation is used to select the first object.
  • the user can select the object to be eliminated by himself, which is more flexible, and the obtained target image is also more in line with the user's needs, and the user experience is better.
  • the method further includes: determining the center point of the third object in the first image, the center point of the fourth object in the first image, and the center point of the fifth object in the third image the center point, and the center point of the sixth object in the third image; wherein the third image is any image in the plurality of images except the first image, the third object and The attributes of the fifth object are the same, and the attributes of the fourth object and the sixth object are the same; the center point of the third object and the center point of the fifth object are set as the same coordinate origin, and A first coordinate system is established based on the coordinate origin; based on the first coordinate system, a first distance between the center point of the fourth object and the center point of the sixth object is determined; when the first distance is greater than or When equal to the seventh threshold, the fourth object is determined to be the first object.
  • the two images to be determined may be set to the same first coordinate system, so as to exclude the influence of factors such as displacement and rotation, so that the display of the obtained target image can be achieved.
  • the effect is better, and the user experience is also better.
  • the positions of the objects represented by the third object and the fifth object are the same at any point in time.
  • the third object and the fifth object used to determine the first coordinate system may be the same fixed object (such as a building, tree, flower), so that the obtained first coordinate system and world coordinate The system is as consistent as possible, the obtained target image is more consistent with the real world, and the display effect is better.
  • the method further includes: receiving a fifth operation; in response to the fifth operation, displaying a first interface, wherein the first interface displays the plurality of images and the target image.
  • the electronic device can realize the elimination of the first object without the user feeling it, and recommend the obtained target image to the user for viewing, without requiring the user to manually trigger the elimination function, which is more convenient to use.
  • an embodiment of the present application provides an electronic device, the electronic device includes at least one memory and at least one processor, the at least one memory is coupled to the at least one processor, and the at least one memory is used to store a computer program,
  • the above-mentioned at least one processor is used to call the above-mentioned computer program, and the above-mentioned computer program includes instructions.
  • the above-mentioned instructions are executed by the above-mentioned at least one processor, the above-mentioned electronic device is made to perform any one of the first aspect and the first aspect in the embodiments of the present application.
  • the image processing method provided by the implementation.
  • the embodiments of the present application provide a computer storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to execute any one of the first aspect and the first aspect in the embodiments of the present application.
  • An image processing method provided by an implementation.
  • the embodiments of the present application provide a computer program product that, when the computer program product runs on an electronic device, enables the electronic device to perform any one of the first aspect and the first aspect in the embodiments of the present application.
  • the image processing method provided by the method.
  • an embodiment of the present application provides a chip, where the chip includes at least one processor, an interface circuit, and a memory, the memory, the interface circuit, and the at least one processor are interconnected through a line, and a computer program is stored in the memory , when the computer program is executed by the at least one processor, the image processing method provided by the first aspect and any one of the implementation manners of the first aspect in the embodiments of the present application is implemented.
  • the electronic device provided in the second aspect, the computer storage medium provided in the third aspect, the computer program product provided in the fourth aspect, and the chip provided in the fifth aspect are all used to execute the first aspect and the first aspect.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a software architecture of another electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an embodiment of a user interface provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a grouping manner provided by an embodiment of the present application.
  • 5-6 are image groups obtained by some grouping processes provided in the embodiments of the present application.
  • FIG. 7 is a schematic flowchart of an image processing method provided by an embodiment of the present application.
  • FIG. 19 is a schematic flowchart of another image processing method provided by an embodiment of the present application.
  • the present application provides an image processing method, which can be applied to electronic equipment.
  • the electronic device can group multiple images according to the similarity of any two images, so as to obtain at least one image group to be processed.
  • Any image group to be processed may include a first image and at least a second image.
  • the electronic device can eliminate the first object in the first image based on a group of images to be processed, that is, first obtain the second object according to at least one second image, and then use the second object to cover or replace the first object in the first image .
  • the above-mentioned multiple images may be obtained by shooting in the default shooting mode of the electronic device, and do not need to be acquired in a specific shooting mode, the application scenarios are wider, and the user is more convenient to use.
  • the above-mentioned second object is a real and reliable image content obtained according to at least one second image, and the display effect is better, thereby improving the user experience.
  • any image in the target image group may include a subject to be photographed, such as people, mountains, trees, water, sky, animals, and so on.
  • a user takes an image through an electronic device there are often other real objects (ie, the above-mentioned first object) other than the subject to be photographed passing through the shooting area, resulting in the above-mentioned first object in the photographed image.
  • the first image Passers-by there are passers-by and passing vehicles in the multiple second images.
  • the user usually does not want to keep the above-mentioned first object in the captured image, so the first object can also be understood as the object to be eliminated.
  • the first object passes through the shooting area, so the first object can also be understood as a moving object (referred to as a moving object) relative to the subject to be shot.
  • the electronic devices involved in the embodiments of the present application may be smart screens, smart TVs, mobile phones, tablet computers, desktops, laptops, notebook computers, Ultra-mobile Personal Computers (UMPCs), handheld computers, and netbooks , Personal Digital Assistant (PDA), wearable electronic devices (such as smart bracelets, smart glasses) and other devices.
  • PDA Personal Digital Assistant
  • FIG. 1 shows a schematic structural diagram of an electronic device 100 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • the electronic device 100 may be configured with a plurality of cameras 193, and the plurality of cameras 193 may include a front camera and a rear camera.
  • the plurality of cameras 193 may include a front camera and a rear camera.
  • there may also be multiple front-facing cameras and the front-facing cameras may, for example, be disposed at the top of the front of the electronic device 100 .
  • there may also be multiple rear cameras such as a rear wide-angle camera, a rear ultra-wide-angle camera, and a rear telephoto camera.
  • the rear camera may be disposed on the back of the electronic device 100 , for example.
  • the plurality of cameras 193 may also be elevating cameras, detachable cameras, etc. The embodiments of the present application do not limit the connection manner and mechanical mechanism of the plurality of cameras 193 and the electronic device 100 .
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 may acquire and save multiple images through the camera 193 , and the multiple images may be stored in the internal memory 121 or an external memory card connected to the external memory interface 120 . Then, the processor 110 of the electronic device 100 may group the plurality of images according to the degree of similarity, so as to obtain at least one image group to be processed. For example, but not limited to, the degree of similarity between two images is characterized by the difference in shooting time, the difference in distance between the shooting locations, the distance and angle of image feature vectors, and the like. Based on the obtained image group to be processed, the processor 110 can identify and eliminate the moving object, for example, cover the area where the moving object is located with a real image obtained from at least one image in the to-be-processed image group.
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
  • FIG. 2 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the The system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
  • the software framework shown in FIG. 2 is just an example, and the system of the electronic device 100 may also be other operating systems, such as Huawei mobile services (huawei mobile services, HMS), etc.
  • the application layer can include a series of applications.
  • applications can include applications such as camera, gallery, map, music, SMS, calendar, call, navigation, Bluetooth, file management, etc.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • an application such as a camera or a gallery may include a function of removing moving objects, and a user can use the above-mentioned function of removing moving objects through an application such as the camera or gallery, so as to obtain an image after removing the moving object.
  • the moving object elimination may also be an application program installed on the electronic device 100, or an online application, such as a web page application, a small program application, etc., which is not limited in this embodiment of the present application.
  • the following embodiments take the moving object elimination as an example of a function included in the gallery application for description.
  • a corresponding hardware interrupt is sent to the kernel layer.
  • the kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer.
  • the application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. Take the touch operation as a touch click operation, and the control corresponding to the click operation is the camera control of the camera application. or multiple photos. The one or more photos can be saved as multiple pictures (also known as images) in a gallery (also known as an album).
  • FIG. 3 exemplarily shows a user interface 30 of a camera application on an electronic device such as a smart phone (the electronic device here may correspond to the aforementioned electronic device 100).
  • the electronic device may detect a touch operation (eg, a click operation) acting on an icon of a camera application, and the icon of the camera application may be on the desktop of the electronic device, and the desktop of the electronic device may include icons of multiple applications.
  • the electronic device may display the user interface 30 shown in FIG. 3 .
  • the user interface 30 may be the user interface of the default photographing mode of the camera application, and may be used by the user to take pictures through the default rear camera of the electronic device.
  • the user may click on the camera application icon to open the user interface 30 of the camera application.
  • the user may also open the user interface 30 in other application programs, for example, the user clicks the shooting control in a social application program to open the user interface 30 .
  • the user interface 30 may include: an area 301 , a shooting function list 302 , a shooting mode list 303 , a control 304 , a control 305 , and a control 306 . in:
  • Area 301 may be referred to as preview frame 301 or viewfinder frame 301 .
  • the preview frame 301 can be used to display the image captured by the camera 193 in real time, and the electronic device can refresh the displayed content in real time, so that the user can preview the image currently captured by the camera 193 .
  • the shooting function list 302 may display at least one shooting function option: a smart vision option 302A, a flash option 302B, a dynamic photo option 302C, a color mode option 302D, and a camera setting option 302E.
  • the electronic device may detect a user operation (eg, a click operation) performed by the user on the dynamic photo option 302C, so as to enable or disable the function of taking a dynamic photo.
  • a user operation eg, a click operation
  • the electronic device can detect the user operation that triggers the photo taking, and in response to the user operation, the electronic device can capture multiple frames of images, and encode the multiple frames of images into a video, and the video is a dynamic photo .
  • an electronic device can capture 40-frame images and encode the 40-frame images into a 24 frames per second (fps) video (ie, a dynamic photo), and the video has a duration of 1.7 seconds.
  • fps frames per second
  • the shooting mode list 303 may display at least one shooting mode option: aperture mode option 303A, night scene mode option 303B, portrait mode option 303C, photo mode option 303D, video mode option 303E, professional mode option 303F, more mode option 303G.
  • the photographing mode option 303D is in the selected state, which is used to indicate that the current photographing mode of the electronic device is the photographing mode, and the photographing mode may be the default photographing mode of the electronic device.
  • the electronic device may detect a user operation (eg, a click operation) acting on other shooting mode options in the shooting mode list 303, and in response to the user operation, the electronic device may switch the shooting mode.
  • the control 304 can be used to monitor user operations that trigger shooting (photographing or video recording).
  • the electronic device can detect a user operation (such as a click operation) acting on the control 304, and in response to the operation, the electronic device can save the image in the preview box 301 as a picture or video in the gallery application. That is, the user can click on the control 304 to trigger a capture.
  • the gallery application can support users to perform various operations on pictures or videos stored on electronic devices, such as browsing, editing, deleting, and selecting. Also, the electronic device may also display thumbnails of the saved images in the control 305 .
  • Control 306 may be used to listen for user actions that trigger flipping the camera.
  • the electronic device can detect a user operation (eg, a click operation) acting on the control 306, and in response to the operation, the electronic device can switch the camera used to acquire the image, such as switching the camera used to acquire the image from the rear camera to the front camera .
  • a user operation eg, a click operation
  • the electronic device may capture and store a plurality of pictures (also referred to as images) through the camera 193 .
  • the electronic device may group the above-mentioned multiple images according to the degree of similarity between any two images, so as to obtain at least one image group to be processed (referred to as the first group).
  • the at least one first grouping is used by the electronic device to achieve the elimination of moving objects.
  • the electronic device here may correspond to the aforementioned electronic device 100 .
  • image features can be extracted for each image first.
  • Electronic devices can use traditional computer vision (computer vision, CV) algorithms to extract image features, such as scale-invariant feature transform (SIFT), accelerated robust features (speeded up robust features, SURF). Corner detection and feature representation.
  • Electronic devices can also use deep learning (DL) algorithms, such as Convolutional Neural Networks (CNN), to extract image features.
  • DL deep learning
  • CNN Convolutional Neural Networks
  • the electronic device can calculate parameters such as the distance or included angle of the feature vectors of any two images, and judge the similarity between the two images through the parameters. When the similarity degree is greater than or equal to the first threshold, the electronic device determines that the two images satisfy the similarity condition.
  • the electronic device may calculate the Euclidean distance of the feature vectors of any two images, wherein the smaller the Euclidean distance, the greater the similarity between the two images, the greater the Euclidean distance, the greater the Euclidean distance between the two images. the smaller the similarity.
  • the electronic device may also calculate the cosine distance of the feature vectors of any two images, wherein the smaller the cosine distance, the greater the degree of similarity between the two images, and the greater the cosine distance, the greater the cosine distance between the two images. the smaller the similarity.
  • the electronic device may also process a plurality of images stored by the electronic device according to the shooting time before calculating the similarity degree, so as to obtain a second group that satisfies the preset time condition.
  • the electronic device determines the similarity degree based on the second grouping.
  • the preset time condition includes: the shooting time of any image in the second group is within the first range, and it can also be understood that the difference between the shooting times of any two images in the second group is less than or equal to the first time threshold .
  • the Gallery app includes 10 images that are not grouped.
  • the electronic device groups the 10 images according to the shooting time, and the first time threshold is 5 minutes. Therefore, the four images taken at 9:10, 9:11, 9:11, and 9:15 belong to group 1, and the two images taken at 10:10 and 10:15 belong to group 1 2.
  • An image whose shooting time is 11:21 belongs to group 3, and three images whose shooting time is 14:35, 14:35, and 14:36 belong to group 4. That is to say, the electronic device obtains four second groups of group 1, group 2, group 3, and group 4.
  • the electronic device may also process a plurality of images stored by the electronic device according to the shooting location before calculating the similarity degree, so as to obtain a third group that satisfies the preset location condition.
  • a specific example is shown in FIG. 4 below.
  • the electronic device determines the similarity degree based on the third group.
  • the preset location condition includes: the shooting location of any image in the second group is within the second range, and it can also be understood that the distance difference between the shooting locations of any two images in the second group is less than or equal to the first distance threshold.
  • the shooting location of any image can be obtained by electronic equipment through technologies such as GPS, and the shooting location can be represented by longitude and latitude. Then the shooting location can be expressed as (114.305215, 30.592935).
  • FIG. 4 exemplarily shows a map range 40 obtained by the electronic device through technologies such as GPS.
  • position 401, position 402, position 403 and position 404 wherein, position 401 is the shooting position of image A, position 402 is the shooting position of image B, and position 403 is the shooting position of image C,
  • the location 404 is the location where the image D was taken.
  • Image A, image B, image C, and image D are multiple images stored by the electronic device. It should be noted that any one of the image A, the image B, the image C, and the image D may include one or more images.
  • a circle with the position 401 as the center and the radius of the first distance threshold is the range 411 , that is, the distance difference between any position within the range 411 and the position 401 is less than or equal to the first distance threshold.
  • taking the position 402 as the center and a circle with a radius of the first distance threshold as the range 412 that is, the distance difference between any position within the range 412 and the position 402 is less than or equal to the first distance threshold.
  • position 403 as the center of the circle and a circle whose radius is the first distance threshold is the range 413 , that is, the distance difference between any position within the range 413 and the position 403 is less than or equal to the first distance threshold.
  • Taking the position 404 as the center of the circle and the circle with the radius of the first distance threshold as the range 414 that is, the distance difference between any position within the range 414 and the position 404 is less than or equal to the first distance threshold.
  • the electronic device can divide the image A, the image B, and the image C into one third group, and divide the image C and the image D into another third group.
  • the electronic device may also measure the similarity between two images by using the shooting time and/or the shooting location. That is, the smaller the difference in shooting time, the greater the degree of similarity, and the greater the difference in shooting time, the smaller the degree of similarity. Similarly, the smaller the distance difference between the shooting locations, the greater the similarity, and the greater the distance difference between the shooting locations, the smaller the similarity.
  • the electronic device may first process the images stored in the electronic device according to the shooting time and the shooting location, so as to obtain a fourth group that satisfies the preset time condition and the preset location condition. Then, the electronic device performs similarity judgment based on the fourth group to obtain at least one first group.
  • the present application does not limit the specific manner of acquiring the first group.
  • the electronic device may first perform focal length registration on the stored multiple images, that is, set the focal length of each image to the same focal length. Then, the electronic device groups the images based on the focal length registration to obtain at least one first group, thereby reducing the processing error.
  • the electronic device can also perform angle registration on the stored multiple images, for example, controlling the angle between the subjects in any two images to be less than or equal to 5 degrees, and then based on the angle registration of the multiple images. group images.
  • the electronic device can process the multiple images stored in the electronic device according to the above-mentioned grouping process to obtain a first group that satisfies the first condition.
  • the first condition includes: the degree of similarity between any two images in the first group is greater than or equal to the first threshold, that is, any two images in the first group satisfy the similarity condition.
  • the first grouping refer to the image group A shown in FIG. 5 and the image group B shown in FIG. 6 , wherein the image group A shown in FIG. 5 may include four images: image 501, image 502, image 503, Image 504.
  • Image group B shown in FIG. 6 may include four images: image 601 , image 602 , image 603 , and image 604 .
  • any image processed by the electronic device may also be a frame of image extracted from a saved video.
  • the electronic device may extract, from the video, at least one frame of image whose degree of similarity with the first image is greater than or equal to the first threshold value through the AI technology.
  • the at least one frame of image and the first image belong to a first group.
  • the electronic device may remove moving objects for each first group obtained above, and the specific process is shown in Figure 7 below. Among them, FIG. 7 is described by taking the image group B shown in FIG. 6 as the first grouping.
  • FIG. 7 exemplarily shows a schematic flowchart of an image processing method.
  • the method can be applied to the electronic device 100 shown in FIG. 1 .
  • the method can also be applied to the electronic device 100 shown in FIG. 2 .
  • the method includes but is not limited to the following steps:
  • S701 The electronic device performs semantic segmentation on the images in the first group.
  • the electronic device can recognize the objects included in the image through semantic segmentation, and a specific example is shown in FIG. 8 below.
  • FIG. 8 exemplarily shows a comparative example before and after semantic segmentation.
  • FIG. 8 is an example of performing semantic segmentation on the image 601 shown in FIG. 6 .
  • the image shown in FIG. 8(A) is the image 601 before semantic segmentation
  • the image shown in FIG. 8(B) is the image 601 after semantic segmentation.
  • the image 601 may include person A, person B, person C, buildings, trees, and cars.
  • the process of semantically segmenting other images in the image group B shown in FIG. 6 by the electronic device is similar to that in FIG. 8 , wherein the image 602 also includes a balloon, the image 603 is consistent with the image 601, and the image 604 does not include a car.
  • the objects included in the image are, for example: people, buildings, cars, green plants (including grass, trees, flowers), food, pets, water, beaches, and mountains. , this application does not limit the specific types of objects.
  • S702 The electronic device determines the photographed subject in the first group.
  • any image in the first group includes the photographed subject.
  • the object included in each image in the first group may be referred to as the first object to be measured.
  • the electronic device may first obtain at least one of the following items: clarity, occupied area, whether it belongs to the first preset category, and whether the area where the focus point is located is located in the area where the first object to be measured is located. Then, based on the acquired content, it is determined that the first object to be measured that satisfies the first preset condition is the subject to be photographed.
  • the first preset condition may include at least one of the following: the sharpness is greater than or equal to the first preset threshold, the occupied area is greater than or equal to the second preset threshold, belongs to the first preset category, and the area where the focus point is located is located in the first to-be-to-be-used area.
  • the area where the test object is located can be characterized by, but not limited to, the grayscale difference or gradient of adjacent pixels in the image. For example, the value calculated by the Brenner gradient function, Tenengrad gradient function, Laplacian gradient function and other algorithms to represent the clarity of the image, the larger the obtained value, the higher the clarity of the image, the smaller the obtained value, the clearer the image the lower the degree.
  • the first preset category may be a category to which an object belongs, such as a person, a pet, a building, a landscape, etc., pre-obtained by the electronic device according to information such as historical images.
  • the electronic device can obtain the facial feature vector of the first person according to the historical image, and identify the identity of the first person as a child (eg, the user directly marks the identity of the person).
  • the facial feature vector of the first object to be tested matches the facial feature vector of the first person (for example, when the degree of similarity is greater than the third preset threshold)
  • the electronic device can recognize the identity of the object as a child, that is, the first The object to be tested belongs to the first preset category.
  • the face feature vector represents the user's face information, for example, may include facial features, face area and shape, and the like.
  • the above definition and area may be the definition and area of the first object to be measured in any image in the first group, and the area where the focus point is located is also any image in the first group.
  • the area where the focus point is located in may also be the clarity and occupied area of the first object to be measured in the preset number of images in the first group, and the area where the above-mentioned focus point is located is also the preset number in the first group.
  • the area where the focus point is located in the image is not limited in this application.
  • the first preset condition includes: occupying the largest area and belonging to the first preset category.
  • the first preset category includes characters and pets.
  • the objects included in each image include person A, person B, person C, buildings and trees. Among them, the person A occupies the largest area, and the person A belongs to the first preset category, so the electronic device can determine the person A as the shooting subject of the image group A.
  • any one of the first objects to be measured in the first group may have a corresponding priority
  • the electronic device may determine the first object to be measured with the highest priority as the shooting subject of the first group.
  • the priority of the object may be determined by at least one of the following: sharpness, occupied area, whether it belongs to the first preset category, and whether the area where the focus point is located is located in the area where the first object to be measured is located.
  • the priority of the first object to be measured is determined by the clarity, the occupied area and whether it belongs to the first preset category.
  • the priority of the first object to be tested can be represented as W.
  • the sharpness is expressed as qa when calculating W, and its weight is wa.
  • the occupied area is expressed as qb when calculating W, and the occupied weight is wb.
  • Whether it belongs to the first preset category is expressed as qc when calculating W, and the weight it occupies is wc. Therefore, the expression for W can be as follows:
  • wa+wb+wc 1.
  • wc>wb>wa which is not limited to this, may also be wc>wa>wb, and the specific value of the weight is not limited in this application.
  • the value of qc can be 0 or 1.
  • the value of qc is 0, it indicates that the first object to be tested does not belong to the first preset category, and when the value of qc is 1, it indicates that the first object to be tested belongs to the first preset category.
  • the value of qc is different, it may also indicate the specific category to which the first object to be measured belongs, and the present application does not limit the value manner of qa, qb, and qc.
  • the priority of the first object to be measured is determined only by the clarity of the first object to be measured.
  • the priority of the first object to be measured is higher.
  • the priority of the first object to be measured is only determined by the occupied area.
  • the priority of the first object to be tested is higher.
  • the priority of the first object to be tested is determined only by whether it belongs to the first preset category, and optionally, it can also be determined by the specific category to which it belongs.
  • the priority of the object can be increased.
  • the first preset category includes people and buildings
  • the priority is increased more, and when it belongs to buildings, the priority is increased less.
  • the first preset category includes characters, and includes the specific identities of the characters: relatives, friends.
  • the priority is increased more, when it belongs to a friend, the priority is increased less, and when it belongs only to a character, but does not belong to relatives and friends, the priority is increased the least.
  • S703 The electronic device determines the first image in the first group.
  • the electronic device may determine, from the first group, a first image that satisfies a second condition, where the second condition includes at least one of the following: the sharpness of the subject in the first image is greater than or equal to a second threshold, the first The number of objects other than the subject in the image is less than the third threshold, the subject in the first image is not blocked, and the state of the subject in the first image is a preset state.
  • the electronic device may determine the number of objects other than the photographed subject based on the result of the semantic segmentation. Not limited to this, the electronic device can also identify the objects included in the image through technologies such as AI, so as to determine the number of other objects.
  • the electronic device can judge whether the subject to be photographed is blocked by whether the similarity of the subject to be photographed in the first group changes. Exemplarily, based on the first grouping, the electronic device may obtain the similarity between any image and the subject being photographed in other images, and when the similarity is less than the fourth preset threshold, the electronic device may determine the photographed subject in the current image.
  • the subject has a significant feature change, that is, it is determined that the subject in the current image is occluded.
  • Electronic devices can identify the state of the subject being photographed through technologies such as artificial intelligence (AI).
  • AI artificial intelligence
  • the state of the photographed subject may include expressions such as smiling and crying, and postures such as standing, leaning, and crouching.
  • the state of the subject to be photographed may include postures such as lying down, standing, and running.
  • the state of the subject to be photographed may include stopping, running, and the like.
  • the photographed subject is a person A
  • the second condition includes: the number of other objects except the photographed subject is the least, and the photographed subject is not blocked.
  • Person A in image 602 is occluded, so image 602 is not considered.
  • Image 601 and image 603 include five objects besides character A: character B, character C, car, building, and tree
  • image 604 includes four objects besides character A: character B, character C, building, Trees, excluding cars. Accordingly, the electronic device may determine the image 604 as the first image of the image group B.
  • any image in the first group may have a corresponding priority
  • the electronic device may determine the image with the highest priority as the first image of the first group.
  • the priority of the images may be determined by at least one of the following: the clarity of the subject, the number of objects other than the subject, whether the subject is blocked, and the state of the subject.
  • the priority of the image is determined by the clarity of the subject in the image, the number of objects other than the subject, and whether the subject is occluded.
  • the priority of the image can be denoted as U.
  • the sharpness of the subject being photographed is expressed as qd when calculating U, and its weight is wd.
  • Whether the subject is occluded is expressed as qe when calculating U, and the weight it occupies is we.
  • the number of objects other than the subject being photographed is expressed as qf when calculating U, and its weight is wf. Therefore, the expression for U can be as follows:
  • wd+we+wf 1.
  • wf>we>wd which is not limited to this, may also be wf>wd>we, and this application does not limit the specific value of the weight.
  • the value of qf may be less than or equal to 0.
  • the value of qf is 0, it means that the number of objects other than the subject being photographed is 0.
  • the value of qf is less than 0, the smaller the qf, the greater the number of other objects except the subject being photographed, and the greater the qf, the less the number of other objects except the subject being photographed.
  • the value of qf may also be greater than or equal to 0, and the present application does not limit the value of qd, qe, and qf.
  • the priority of the image is determined only by the sharpness of the subject in the image. The higher the clarity of the subject in the image, the higher the priority of the image.
  • the priority of the image is only determined by whether the subject in the image is occluded.
  • the priority of the image can be increased, and when the subject to be photographed in the image is blocked, the priority of the image can be decreased.
  • the priority of the images is determined only by the state of the subject being photographed. Assuming that the subject in the image is a person, the facial features and expressions of the person are the state of the subject. When the character's eyes are open, the priority of the image can be raised, and when the character's expression is smiling, the priority of the image can be raised.
  • the priority of the image is only determined by the number and area of objects other than the subject in the image. When the number of objects other than the subject in the image is smaller, the priority of the image is higher, and when the area of the objects other than the subject in the image is smaller, the priority of the image is higher.
  • S704 The electronic device determines the first object in the first group.
  • this application may refer to any object in the first group except the subject being photographed as the third object, and the electronic device may obtain the third object in the first image and the third object in other images of the first group.
  • the electronic device may determine the third object as the first object.
  • the first object is the moving object to be eliminated.
  • coordinate registration is performed first, that is, the images in the first group are arranged in the same coordinate system.
  • the coordinate system may be a two-dimensional coordinate system or a three-dimensional coordinate system, and the present application uses a two-dimensional coordinate system as an example for description.
  • any two images in the first group may be referred to as the first image to be measured and the second image to be measured, and the following exemplarily describes the coordinate registration process of the first image to be measured and the second image to be measured.
  • the electronic device may first acquire at least one first key point in the first image to be tested and at least one second key point in the second image to be tested, wherein the number of the first key points and the number of the second key points are the same.
  • One first key point corresponds to one second key point, that is, the degree of similarity between the first key point and the second key point is greater than or equal to the sixth preset threshold.
  • the first image to be tested is image 604
  • the first key point is the center point of the left eye of person A in image 604
  • the second image to be tested is image 603
  • the second key point is the left eye of person A in image 603 the center point.
  • the number of the first key point and the second key point can be expressed as n
  • the first key point included in the first image to be tested can be expressed as the sequence P 1 ⁇ p 11 (x 11 , y 11 ), p 12 (x 12 ,y 12 ),...,p 1n (x 1n ,y 1n ) ⁇
  • the second key point included in the second image to be tested can be represented as a sequence P 2 ⁇ p 21 (x 21 ,y 21 ),p 22 (x 22 ,y 22 ),...,p 2n (x 2n ,y 2n ) ⁇ .
  • the second image to be measured needs to be rotated and translated to be in the standard coordinate system, where the rotation value can be expressed as R(x r , y r ), the translation value It can be expressed as T(x t , y t ).
  • R rotation value
  • T translation value
  • P 1 , P 2 , R, T satisfy the following formula:
  • the electronic device may obtain the rotation value R and the translation value N by inverting the matrix, and then rotate the second image to be measured according to R and translate according to N.
  • the first image to be tested and the second image to be tested are in the same standard coordinate system, and the first key point and the corresponding second key point are coincident.
  • the selected first key point and second key point may be located on the subject to be photographed, or may be located at one or more at any point in time On objects whose positions are unchanged, such as buildings, green plants (including grass, trees, flowers), beaches, mountains, and so on.
  • the electronic device may obtain the center points of the third objects in different images under the above-mentioned standard coordinate system, and calculate the distances of these center points. When any distance is greater than or equal to the fifth preset threshold, the electronic device may determine that the third object is the moving object to be eliminated (ie, the first object). A specific example is shown in FIG. 9 below.
  • FIG. 9 exemplarily shows a schematic diagram of determining a first object.
  • FIG. 9 is used as an example to illustrate that the third object to be confirmed is the person B in the image group A shown in FIG. 6 .
  • the two-dimensional coordinate system established with point O as the coordinate origin is the standard coordinate system obtained by the above-mentioned coordinate registration.
  • An image with a gray background is the first image (ie, image 604 )
  • area 900 is the area where person A (ie, the subject) in image 604 is located
  • point O is the center point of person A in image 604 .
  • the center point of person A and point O coincide, and the area where person A is located also overlaps with area 900 , wherein the area where image 601 is located and the area where image 604 is located completely overlap.
  • the area 6010 is the area where the person B is located in the image 601
  • the area 6020 is the area where the person B is located in the image 602 .
  • the overlapping degree of the area 6010 and the area 6020 is greater than the sixth preset threshold, so the electronic device may consider that the displacement of the person B in the image 601 and the image 602 is 0.
  • the area 6030 is the area where the person B is located in the image 603
  • the distance between the center point of the area 6010 or the area 6020 and the center point of the area 6030 is the first distance d 1 .
  • the area 6040 is the area where the person B is located in the image 604, and the distance between the center point of the area 6030 and the center point of the area 6040 is the second distance d 2 . Accordingly, the distance between the center point of area 6010 or area 6020 and the center point of area 6040 is d 1 +d 2 . When any one of d 1 , d 2 , and d 1 +d 2 is greater than the second distance threshold, the electronic device may recognize the person B as a moving object to be eliminated (ie, the first object).
  • the electronic device can also recognize the person C and the car in the image group B shown in FIG. 6 as the moving object to be eliminated (ie the first object) according to the method of S704.
  • the specific process is the same as that shown in FIG. 9 .
  • the example is similar and will not be repeated here.
  • the electronic device may also determine that the third object is a moving object to be eliminated (i.e. the first object).
  • the center point of any object in this application may be the center point of the rectangle when the object is converted into a rectangle.
  • the widest line segment in the object can be used as a set of opposite sides of the rectangle, and the highest line segment can be used as another set of opposite sides of the rectangle.
  • the center of gravity of an irregular object may also be directly obtained as the center point of the object.
  • the electronic device may first set the focal length of each image in the first group to the same focal length, and then perform coordinate registration, thereby reducing processing errors.
  • S705 The electronic device eliminates the first object in the first image of the first group to obtain the target image.
  • the electronic device may first determine the second image including the second object from the first grouping.
  • the second image is an image other than the first image in the first group, the number of the second image is at least one, and the second object is used to cover or replace the first object in the first image.
  • the position of the second object in the standard coordinate system obtained by the coordinate registration is the same as the position of the first object in the standard coordinate system.
  • the first image (ie, image 604 ) includes a moving object to be eliminated: person B, and the area where person B is located is area 6040 .
  • the electronic device can convert the irregular area 6040 into the rectangle 1040 shown in FIG. 10A , and the position of the rectangle 1040 can be represented as S ⁇ x min , x max , y min , y max ⁇ , at this time the first object can be equivalent to the rectangle 1040.
  • the electronic device may determine the area where the position S in the other images of the first group is located based on the above-mentioned standard coordinate system, and a specific example is shown in FIGS. 10B-10D .
  • the image 601 is the second image determined by the electronic device
  • the area 1010 is the second object determined by the electronic device.
  • the electronic device can use the area 1010 (ie, the second object) in the image 601 (ie, the second image) shown in (A) of FIG. 11 to cover or replace the area shown in (B) of FIG. 11 .
  • the area 1040 (ie, the first object) in the image 604 (ie, the first image) of FIG. 11 to obtain the target image 1100 shown in (C) of FIG. 11 , wherein the target image 1100 does not include the person B (ie, the moving object).
  • the electronic device may further process the edge of the second object in the target image, so as to make the second object and other image contents of the target image more coordinated , the transition is more natural, the authenticity is stronger, and the user experience is better.
  • the electronic device can obtain the target image according to the embodiments shown in FIGS. 4-9, 10A-10D, and 11, and recommend the target image to the user. Specific examples are shown in FIGS. 12 and 13A-13B. Show. The user does not need to manually trigger the process of eliminating moving objects, and the user is more convenient to use.
  • FIG. 12 exemplarily shows a user interface 120 of a gallery application on an electronic device such as a smart phone.
  • the electronic device may detect a touch operation (eg, a click operation) acting on an icon of the gallery application, and the icon of the gallery application may be on the desktop of the electronic device (also referred to as the main interface of the electronic device).
  • the electronic device may display the user interface 120 shown in FIG. 12 .
  • User interface 120 may be the main interface of the gallery application. That is, the user may click on the icon of the gallery application to open the user interface 120 of the gallery application.
  • the user can also open the user interface 120 in other applications, for example, the user clicks the photo album control in a social application to open the user interface 120, and the user clicks the control 305 in the user interface 30 of the camera application to open the user interface 120.
  • the user interface 120 may include a control 121 , an album list 122 , and a gallery function list 123 . in:
  • Control 121 may be referred to as search bar 121 .
  • the search bar 121 can be used to receive the information input by the user, and the electronic device can search the pictures or videos stored in the electronic device according to the information input by the user, so as to obtain the pictures or videos matching the information input by the user, and use the matching pictures or videos. or video to show users.
  • Album list 122 may include one or more image categories, such as may include camera category 122A, all pictures category 122B, similar pictures category 122C, and the like. Each image category can include one or more pictures or videos.
  • the electronic device may classify the pictures or videos into one or more of the above image categories according to the source, content, etc. of the pictures or videos. For example, pictures and videos captured by the electronic device through the camera 193 belong to the camera category 122A. Pictures taken by the electronic device through the camera 193, obtained from other devices, and downloaded from the Internet belong to the all pictures category 122B.
  • Similar picture classification 122C may include: the electronic device groups a plurality of stored pictures to obtain at least one image in the first group. In the following embodiments, the similar picture classification 122C includes two first groups: group 1 and group 2, wherein group 1 is the image group A shown in FIG. 5 as an example for description.
  • the gallery function list 123 may include one or more function options, for example, may include a photo function option 123A, a gallery function option 123B, a time function option 123C, and a discovery function option 123D.
  • the electronic device may detect a touch operation (eg, a click operation) performed by the user on the photo function option 123A, and in response to the touch operation, the electronic device may display pictures and videos captured by the camera 193 .
  • the electronic device can also detect a touch operation (eg, a click operation) performed by the user on the camera category 122A, and in response to the touch operation, the electronic device can also display pictures and videos captured by the camera 193 .
  • the gallery function option 123B When the gallery function option 123B is selected, the electronic device can display the user interface 120 shown in FIG. 12 .
  • FIG. 13A exemplarily shows yet another user interface 130 of a gallery application on an electronic device such as a smart phone.
  • the electronic device can detect a touch operation (eg, a click operation) acting on the similar picture category 122C in the user interface 120 shown in FIG. 12 , and in response to the touch operation, the electronic device can display the user shown in FIG. 13A . interface 130 .
  • a touch operation eg, a click operation
  • the user interface 130 may include a control 131 , a list of similar pictures 132 , and an area 133 . in:
  • Control 131 can display text information: similar pictures (group 1).
  • the electronic device may detect a touch operation (eg, a click operation) performed by the user on the control 131, and in response to the touch operation, the electronic device may display the user interface 130 shown in FIG. 13B .
  • the user interface 130 shown in FIG. 13B includes an option list 134, and the option list 134 includes similar pictures (all) 134A, similar pictures (group 1) 134B, and similar pictures (group 2) 134C.
  • the electronic device can display the user interface 130 shown in FIGS. 13A and 13B .
  • the images included in the similar picture list 132 of the user interface 130 are images of a first group obtained by grouping electronic devices.
  • the electronic device can detect a touch operation (eg, a click operation) acting on the similar picture (all) 134A, and in response to the touch operation, the electronic device can display images of all the first groups (ie, group 1 and group 2) obtained by grouping .
  • the electronic device can also detect a touch operation (such as a click operation) acting on the similar picture (group 2) 134C, and in response to the touch operation, the electronic device can display another first group obtained by grouping (for example, as shown in FIG. 6 ). Images of image group B).
  • the similar picture list 132 may include an image 132A, an image 132B, an image 132C and an image 132D, and these four images are a first group obtained by grouping electronic devices: the images in the image group A shown in FIG. 5 .
  • Area 133 may include title 133A and area 133B.
  • Title 133A is used to display text information: Smart Recommendation.
  • the area 133B may display text information: "moving object removal" is recommended.
  • the electronic device may display in the area 133B: a thumbnail image of the target image obtained by the electronic device eliminating moving objects based on group 1 (ie, the image group A shown in FIG. 5 ).
  • the electronic device may detect a touch operation (eg, a click operation) acting on the area 133B, and in response to the touch operation, the electronic device may display the above-mentioned target image.
  • the electronic device displays the target image, the user can perform various operations on the target image, such as editing, deleting, and selecting.
  • the electronic device may also receive user operations for selecting multiple images and triggering a function to remove moving objects.
  • the electronic device may identify a plurality of images selected by the user as an image group to be processed (ie, a first grouping), and then remove moving objects based on the first grouping. That is to say, the electronic device can remove moving objects based on the image group manually selected by the user, and specific examples are shown in FIGS. 14-15 .
  • FIG. 14 exemplarily shows a schematic diagram of human-computer interaction.
  • the user interface 141 shown in FIG. 14(A) is the user interface for selecting multiple pictures before the user clicks the control 1413D
  • the user interface 142 shown in FIG. 14(B) is the user interface after the user clicks the control 1413D. .
  • the user interface 141 may include a title 1411 , a picture list 1412 , and a picture function option 1413 . in:
  • Header 1411 may include controls 1411A and textual information 1411B.
  • the text information 1411B may be determined by the number of pictures selected by the user. In the user interface 141 shown in (A) of FIG. 14 , the text information 1411B is: 4 items have been selected, indicating that the number of pictures the user has selected is 4.
  • Picture list 1412 may include one or more pictures, for example, may include picture 1412A, picture 1412B, picture 1412C, picture 1412D, picture 1412E, picture 1412F.
  • the picture 1412A may include a selection box 1412A-1, and the selection box 1412A-1 shown in (A) of FIG. 14 is in a selected state to indicate that the user has selected the picture 1412A.
  • picture 1412B may include selection box 1412B-1
  • picture 1412D may include selection box 1412D-1
  • picture 1412E may include selection box 1412E-1.
  • Picture 1412C may include selection box 1412C-1
  • picture 1412F may include selection box 1412F-1.
  • the selection boxes 1412C- 1 and 1412F- 1 shown in (A) of FIG. 14 are both non-selected states, indicating that the user has not selected the picture 1412C and the picture 1412F.
  • the picture function option 1413 may include one or more function options, for example, may include a share function option 1413A, a delete function option 1413B, a select all function option 1413C, a moving object removal function option 1413D, and a more function option 1413E.
  • the electronic device may detect a touch operation (eg, a click operation) acting on the moving object removal function option 1413D. In response to the touch operation, the electronic device determines that the user selects picture 1412A, picture 1412B, picture 1412D, and picture 1412E. Then, the electronic device can obtain the similarity degree of any two pictures among the four pictures, and the description of obtaining the similarity degree can refer to the description of the above-mentioned grouping process, and will not be repeated here. Assuming that the similarity of any two pictures above is greater than or equal to the first threshold, the electronic device determines that these four pictures are an image group to be processed (ie, the first group).
  • a touch operation e.g, a click operation
  • the electronic device may remove the moving object based on the first grouping to obtain the target image after removing the moving object.
  • the specific process can refer to the embodiment shown in FIG. 7 above, which will not be repeated. That is, the user can manually select multiple pictures to be processed (ie, the first group), and trigger the function of removing moving objects by clicking on the moving object removing function option 1413D.
  • the electronic device may display the user interface 142 shown in (B) of FIG. 14 .
  • the user interface 142 may include a picture list 1421 and a prompt box 1422 .
  • the prompt box 1422 may include prompt information and an area 1422A.
  • the area 1422A may be used to display a thumbnail of the target image after removing the moving object, and the prompt box 1422 may include text information: The picture obtained by "moving object elimination" has been stored in "All pictures". It can be known from the text information in the prompt box 1422 that the electronic device stores the target image in the gallery application, and the target image belongs to all picture categories 122B.
  • the picture list 1421 may include pictures in the picture list 1412 shown in (A) of FIG. 14 and an area 1421A for displaying a thumbnail of the target image after removing the moving object. The area of the target image displayed in area 1421A and the target image displayed in area 1422A may be different.
  • the electronic device can detect a touch operation (such as a click operation) acting on the control 1411A, and in response to the touch operation, the electronic device can cancel the display of the selection box 1412A-1, the selection box 1412B-1, and the selection box 1412C- 1. Selection box 1412D-1, selection box 1412E-1, selection box 1412F-1, picture function option 1413. And, in response to the touch operation, the electronic device can change the text information 1411B to all pictures.
  • the user interface displayed by the electronic device may be: after the user clicks all the picture categories 122B in the user interface 120 shown in FIG. 12 , the user operates the user interface displayed by the electronic device in response to the click.
  • the electronic device cannot eliminate moving objects based on the multiple pictures selected by the user. Therefore, the electronic device can prompt the user to re-select the picture, and for a specific example, refer to the embodiment shown in FIG. 15 .
  • FIG. 15 exemplarily shows yet another schematic diagram of human-computer interaction.
  • the user interface 141 shown in FIG. 15(A) is the user interface for selecting multiple pictures before the user clicks the control 1413D
  • the user interface 150 shown in FIG. 15(B) is the user interface after the user clicks the control 1413D .
  • the user interface 141 is similar to the user interface 141 shown in FIG. 14(A), except that the pictures selected by the user are changed to: picture 1412A, picture 1412C, picture 1412F, and text information 1411B also corresponds to Change to "3 items selected".
  • the electronic device may detect a touch operation (eg, a click operation) acting on the moving object removal function option 1413D. In response to the touch operation, the electronic device determines that the user selects picture 1412A, picture 1412C, and picture 1412F. Then, the electronic device can obtain the similarity degree of any two pictures among the three pictures, and the description of obtaining the similarity degree can refer to the description of the above-mentioned grouping process, and will not be repeated here. Assuming that the similarity of any two pictures above is smaller than the first threshold, the electronic device determines that the three pictures cannot be processed as a first group. At this time, the electronic device displays the user interface 150 shown in (B) of FIG. 15 .
  • a touch operation e.g, a click operation
  • the user interface 150 may include a picture list 151 and a prompt box 152 .
  • the picture list 151 may include pictures in the picture list 1412 shown in (A) of FIG. 15 .
  • the prompt box 152 may include text information: "moving object removal" failed, please select a picture in the same scene.
  • the electronic device may also receive user operations for selecting an image and triggering a function to remove moving objects.
  • the electronic device may identify an image selected by the user as the first image, then acquire a first group including the first image, and remove moving objects based on the first group. That is, the electronic device may remove moving objects based on the first image manually selected by the user, a specific example is shown in FIG. 16 .
  • FIG. 16 exemplarily shows yet another schematic diagram of human-computer interaction.
  • the user interface 160 shown in FIG. 16(A) is the user interface before the user clicks the control 162C
  • the user interface 160 shown in FIG. 16(B) is the user interface after the user clicks the control 162C.
  • the user interface 160 may include a picture 161 and a picture function option 162 .
  • the electronic device may detect a touch operation (eg, a click operation) acting on the thumbnail of the picture 161 , and in response to the touch operation, the electronic device may display the user interface 160 shown in (A) of FIG. 16 .
  • the thumbnail of the picture 161 can be displayed in the control 305 shown in FIG. 3 .
  • the thumbnail of the picture 161 may be displayed in any picture list, for example, the picture list 151 shown in (B) of FIG. 15 .
  • the picture function option 162 may include one or more function options for the picture 161 , for example, may include a share function option 162A, a delete function option 162B, a moving object removal function option 162C, and a more function option 162D.
  • the electronic device may detect a touch operation (eg, a click operation) acting on the moving object removal function option 162C, and in response to the touch operation, the electronic device may recognize the picture 161 as the first image. Then, the electronic device can acquire a plurality of pictures whose similarity with the picture 161 is greater than or equal to the first threshold, and the picture 161 and the acquired pictures are identified as a first group. description, without further elaboration.
  • the electronic device may remove the moving object based on the first grouping to obtain the target image after removing the moving object.
  • the specific process can refer to the embodiment shown in FIG. 7 above, which will not be repeated.
  • the electronic device may display the user interface 160 shown in (B) of FIG. 16 . That is, the user can trigger the function of removing moving objects by clicking on the moving object removing function option 162C.
  • the user interface 160 shown in (B) of FIG. 16 further includes a prompt box 163 , and the prompt box 163 may include text information: the picture obtained by “moving object elimination” has been Stored in All Pictures. It can be known from the text information in the prompt box 163 that the electronic device stores the target image in the gallery application, and the target image belongs to all picture categories 122B. The user can click on all picture categories 122B in the user interface 120 shown in FIG. 12 to view the target image. That is, the user can manually select the first image and trigger the function of eliminating moving objects.
  • the electronic device may prompt the user to re-select a picture, and the specific example is similar to the embodiment shown in FIG. 15 , and details are not repeated here.
  • the user can also select a picture on the user interface 141 shown in FIG. 14(A) and FIG. 15(A), and then click the moving object removal function option 1413D .
  • the electronic device may identify a picture selected by the user as the first image, and remove moving objects based on the first image, which is not limited in this embodiment of the present application.
  • the electronic device may also receive a user operation for an image, where the user operation is used to select a subject to be photographed in the above image and trigger the function of eliminating moving objects.
  • the electronic device may acquire a first group including the above-mentioned images, and identify the above-mentioned images as the first images of the first group. Then, the electronic device may remove moving objects based on the first grouping, the first image, and the subject selected by the user. That is to say, the electronic device can eliminate moving objects based on the subject to be photographed manually selected by the user, a specific example is shown in FIG. 17 .
  • FIG. 17 exemplarily shows yet another schematic diagram of human-computer interaction.
  • the user interface 171 shown in FIG. 17(A) is the user interface before the user clicks the control 1711B
  • the user interface 172 shown in FIG. 17(B) is the user interface after the user clicks the control 1711B.
  • the user interface 171 may include a picture 161 and an erasing function option 1711 .
  • the electronic device can detect a touch operation (eg, a click operation) acting on the moving object removal function option 162C in the user interface 160 shown in (A) of FIG. 16 , and in response to the touch operation, the electronic device can display The user interface 171 shown in (A) of FIG. 17 .
  • a touch operation eg, a click operation
  • the elimination function option 1711 may include an intelligent elimination function option 1711A and a manual elimination function option 1711B.
  • the electronic device may detect a touch operation (eg, a click operation) acting on the smart removal function option 1711A, and in response to the touch operation, the electronic device may recognize the picture 161 as the first image. Then, the electronic device can acquire a plurality of pictures whose similarity with the picture 161 is greater than or equal to the first threshold, and the picture 161 and the acquired pictures are identified as a first group. description, without further elaboration. Then, the electronic device may remove the moving object based on the first grouping to obtain the target image after removing the moving object. For the specific process, refer to the embodiment shown in FIG. 7 above, which will not be repeated. After obtaining the target image, the electronic device may display the user interface 160 shown in (B) of FIG. 16 . That is, the user can trigger the function of removing moving objects by clicking on the smart removal function option 1711A.
  • a touch operation eg,
  • the electronic device may also detect a touch operation (eg, a click operation) acting on the manual cancellation function option 1711B, and in response to the touch operation, the electronic device may display the user interface 172 shown in (B) of FIG. 17 .
  • User interface 172 may include pictures 161 and functional options 1721 . in:
  • the electronic device may detect a touch operation (eg, a click operation) acting on any object in the picture 161, and in response to the touch operation, the electronic device may determine the object as the subject currently selected by the user.
  • a touch operation eg, a click operation
  • the electronic device may determine the object as the subject currently selected by the user.
  • the user interface 172 shown in (B) of FIG. 17 the user has selected the human object in the area 161A.
  • the functional options 1721 may include an OK option 1721A and a cancel option 1721B.
  • the electronic device may detect a touch operation (eg, a click operation) acting on the determination option 1721A, and in response to the touch operation, the electronic device may acquire a number of images whose degree of similarity with the picture 161 is greater than or equal to the first threshold.
  • a picture, picture 161 and the acquired pictures are identified as a first group, and the calculation method of the similarity degree can refer to the description of the above grouping process, and will not be repeated here.
  • the electronic device may identify the picture 161 as the first image in the first group, identify the object selected by the user as the photographed subject in the first group, and remove moving objects based on the first group.
  • the electronic device can obtain the target image after removing the moving object, and at this time, the user interface 160 shown in (B) of FIG. 16 can be displayed. That is, the user can manually select the subject to be photographed, and trigger the function of eliminating moving objects by determining option 1721A.
  • the electronic device may also detect a touch operation (eg, a click operation) acting on the cancel option 1721B, and in response to the touch operation, the electronic device may display the user interface 171 shown in FIG. 17(A) or FIG. 16(A) User interface 160 shown.
  • a touch operation eg, a click operation
  • the electronic device may also receive a user operation for an image, where the user operation is used to select a moving object to be eliminated in the above image, and trigger the function of eliminating the moving object.
  • the electronic device may acquire a first group including the above-mentioned images, and identify the above-mentioned images as the first images of the first group. Then, the electronic device may remove the moving object based on the first grouping, the first image, and the moving object selected by the user. That is to say, the electronic device can eliminate the moving objects manually selected by the user, and a specific example is shown in FIG. 18 .
  • FIG. 18 exemplarily shows a user interface 180 of a gallery application on an electronic device such as a smart phone.
  • the electronic device can detect a touch operation (eg, a click operation) acting on the manual cancellation function option 1711B in the user interface 171 shown in (A) of FIG. 17 , and in response to the touch operation, the electronic device can display FIG. 18 User interface 180 is shown.
  • a touch operation eg, a click operation
  • the user interface 180 may include a picture 161 and function options 181 .
  • the electronic device may detect a touch operation (eg, a click operation) acting on any object in the picture 161, and in response to the touch operation, the electronic device may determine the object as the moving object currently selected by the user to be eliminated.
  • the user has selected the human object in the area 161B.
  • the functional options 181 may include an OK option 181A and a cancel option 181B.
  • the electronic device may detect a touch operation (eg, a click operation) acting on the determination option 181A.
  • the electronic device can acquire a plurality of pictures with a degree of similarity greater than or equal to the first threshold value with the picture 161, and the picture 161 and the acquired pictures are identified as a first group, and the calculation method of the degree of similarity can be: Refer to the description of the above grouping process, which is not repeated here.
  • the electronic device may identify the picture 161 as the first image in the first group, identify the object selected by the user as the moving object to be eliminated in the first group, and eliminate the moving object based on the first group. For details of the elimination process, reference may be made to the embodiment shown in FIG. 7 , which will not be repeated. Finally, the electronic device obtains the target image after removing the moving object, and at this time, the user interface 160 shown in (B) of FIG. 16 can be displayed. That is, the user can manually select the moving object to be eliminated, and trigger the function of eliminating the moving object by determining the option 181A.
  • the electronic device may also detect a touch operation (eg, a click operation) acting on the cancel option 181B, and in response to the touch operation, the electronic device may display the user interface 171 shown in FIG. 17(A) or FIG. 16(A) User interface 160 shown.
  • a touch operation eg, a click operation
  • the electronic device may first acquire any two images of the object selected by the user in the first group the distance between.
  • the electronic device determines that the object selected by the user is the moving object to be eliminated in the first group, and eliminates the moving object based on the first group.
  • the electronic device determines that the object selected by the user cannot be used as the first object to eliminate the moving object. Therefore, the electronic device can prompt the user to re-select the moving object, and the specific example is similar to the embodiment shown in FIG. 15 , and details are not repeated here.
  • the process of determining whether the object selected by the user is the first object reference may be made to the description of S704 in FIG. 7 , and details are not repeated here.
  • the user can select both the subject to be photographed and the moving object.
  • the user can click the confirmation option 1721A in the user interface 172 shown in (B) of FIG. 17 .
  • the electronic device may display the user interface 180 shown in FIG. 18 .
  • the user may click the OK option 181A in the user interface 180 .
  • the electronic device may remove the moving object based on the subject to be photographed and the moving object selected by the user, which is not limited in this embodiment of the present application.
  • FIG. 19 is an image processing method provided by an embodiment of the present application.
  • the method can be applied to the electronic device shown in FIG. 1 .
  • the method can also be applied to the electronic device shown in FIG. 2 .
  • the method includes but is not limited to the following steps:
  • S101 The electronic device determines a plurality of images that meet the first condition.
  • the first condition may include: the degree of similarity between any two images in the multiple images is greater than or equal to the first threshold, and the multiple images may be referred to as a first group.
  • the first condition may further include at least one of the following: receiving the first operation, the shooting time of any one of the multiple images is within the first range, and the shooting of any one of the multiple images The location is within the second range, wherein the first operation is used to select the plurality of images.
  • the first operation is used to select the plurality of images.
  • the plurality of images determined by the electronic device may be obtained by the electronic device through a default shooting mode, so that the embodiments of the present application can be implemented in a general scenario, and the application is more extensive.
  • the electronic device determines, from the plurality of images, a first image that satisfies the second condition, where the first image includes the first object.
  • the first object is a moving object to be eliminated in the first image.
  • the second condition includes at least one of the following: the sharpness of the subject in the first image is greater than or equal to the second threshold, and the number of objects other than the subject in the first image is less than the third threshold.
  • the electronic device may process and determine each image in the first group to obtain a first image in the first group that satisfies the second condition. For details, please refer to the description of S703 in FIG. 7 , which will not be repeated.
  • the second condition may further include receiving a user operation for selecting the first image.
  • determining the first image through the user operation reference may be made to the embodiment shown in FIG. 16 , and details are not repeated here.
  • the electronic device may first perform semantic segmentation on each image in the above-mentioned multiple images (ie, the first group), so as to identify objects (such as people, buildings, cars, etc.) included in the image.
  • semantic segmentation on each image in the above-mentioned multiple images (ie, the first group), so as to identify objects (such as people, buildings, cars, etc.) included in the image.
  • objects such as people, buildings, cars, etc.
  • the method further includes: the electronic device determines, from the above-mentioned multiple images (ie, the first grouping), a subject to be photographed that satisfies the third condition.
  • the third condition includes at least one of the following: receiving the second operation, the sharpness of the photographed subject in any image in the first group is greater than or equal to the fourth threshold, and the matching of any image in the first group is equal to or greater than the fourth threshold.
  • the focal point is in the area where the subject is located, the area of the subject in any image in the first group is greater than or equal to the fifth threshold, and the subject belongs to a preset category, wherein the second operation is used to select the subject.
  • the electronic device may process and judge each object in the first group to obtain the photographed subject in the first group that satisfies the third condition.
  • S702 in FIG. 7 please refer to the description of S702 in FIG. 7 , which will not be repeated.
  • FIG. 17 For an example of determining the subject to be photographed through the second operation, reference may be made to the embodiment shown in FIG. 17 , and details are not repeated here.
  • the electronic device may determine the first object in the first grouping.
  • the electronic device can first configure the images in the first group in the same coordinate system (that is, the coordinate registration in S704 of FIG. 7 ), and then obtain each object between any two images in the first group based on the coordinate system. distance between. When the distance is greater than or equal to the fifth preset threshold, the electronic device may determine the object as the first object.
  • the electronic device may determine the object as the first object. For details, please refer to the description of S704 in FIG. 7 , which will not be repeated.
  • S103 The electronic device determines a second image from the plurality of images, where the second image includes a second object.
  • the second image may be at least one image other than the first image among the multiple images, for example, the second image is an image with the highest degree of similarity to the first image among the multiple images, or the second image
  • the image is at least one image of the plurality of images whose degree of similarity with the first image is greater than a preset threshold.
  • the second object may be obtained according to one second image, or may be obtained by splicing at least one second image.
  • the position of the second object in the second image corresponds to the position of the first object in the first image. That is, when the first image and the second image are in the same first coordinate system, the position of the second object in the second image is the same as the position of the first object in the first image.
  • the first coordinate system is a coordinate system obtained after the electronic device performs coordinate registration, for example, the standard coordinate system shown in S704 of FIG. 7 . Examples of determining the second object by the electronic device and the second image including the second object may refer to the embodiments shown in FIG. 9 and FIGS. 10A-10D , which will not be repeated.
  • S104 The electronic device covers or replaces the first object with the second object to obtain the target image.
  • the electronic device uses the second object to cover or replace the first object
  • An example of the obtained target image may refer to the image 1100 shown in (C) of FIG. 11 .
  • the target image Compared with the first image, the target image not only eliminates the moving objects, but also displays the real image content on the area after the moving objects are eliminated, and the user experience is better.
  • the process shown in FIG. 19 may be executed by the electronic device in the background, and the user does not feel it.
  • the electronic device After the electronic device obtains the target image, it can recommend the target image to the user, without requiring the user to manually trigger the function of eliminating moving objects.
  • FIGS. 13A-13B For specific examples, refer to the embodiments shown in FIGS. 13A-13B .
  • the electronic device can determine to obtain a first group in the same shooting scene, the images in the first group can be images obtained by the electronic device through the default shooting mode, and the electronic device can move based on the first group. Elimination of the object (ie the first object). Therefore, the user does not need to use a specific shooting mode to realize the elimination of moving objects, which is more convenient to use and has wider application scenarios. Moreover, the image content used to fill or cover the moving object is obtained according to the real second image, and the display effect is better, and the user experience is also better.
  • the electronic device can realize the elimination of moving objects without the user feeling it, and recommend the obtained target image to the user for viewing, without requiring the user to manually trigger the elimination function, which is more convenient to use.
  • the user can also manually select the first group, the first image, the photographed subject or the moving object, which is more flexible.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product described above includes one or more computer instructions.
  • the computer program instructions described above are loaded and executed on a computer, the procedures or functions described above in accordance with the present application are produced in whole or in part.
  • the aforementioned computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the above-mentioned computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the above-mentioned computer instructions may be transmitted from a website site, computer, server or data center via wired communication. (eg coaxial cable, optical fiber, digital subscriber line) or wireless (eg infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. that includes one or more available media integrated.
  • the above-mentioned usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk), and the like.

Landscapes

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

Abstract

本申请实施例提供一种图像处理方法,应用于电子设备,该方法包括:确定符合第一条件的多张图像,第一条件包括:多张图像中任意两张图像的相似程度大于或等于第一阈值,多张图片包括至少两张图片;从多张图像中确定出满足第二条件的第一图像,第一图像包括第一对象,第一对象为第一图像中待消除的对象;从多张图像中确定出第二图像,第二图像包括第二对象,第二对象在第二图像中的位置和第一对象在第一图像中的位置相对应;使用第二对象覆盖或替换第一对象,以得到目标图像。采用本申请实施例能够在通用场景下实现图像中移动物体的消除,用户使用方便,并且得到的目标图像的真实性也较高。

Description

图像处理方法及电子设备
本申请要求于2020年12月15日提交中国专利局、申请号为202011483124.1、申请名称为“图像处理方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法及电子设备。
背景技术
用户通过手机、平板电脑等电子设备拍摄照片时,经常将途径拍摄区域的路人、车辆等移动物体拍摄到照片中,但大多数情况下用户并不想将这些移动物体保留在照片中,为了满足用户需求,电子设备可以提供消除照片中移动物体的功能。
目前,用户可以开启电子设备特定的拍摄模式,并在该特定的拍摄模式下拍摄多帧图像(例如1.7秒的视频),电子设备可以基于这多帧图像实现路人的消除并填充消除路人后的区域,但这种方式不够方便,电子设备无法处理用户通过电子设备默认的拍摄模式拍摄的单张照片。或者,用户通过电子设备默认的拍摄模式拍摄单张照片后,可以选择单张照片中的某个人物进行消除,其中,用于填充消除该人物后的区域的图像内容是电子设备通过人工智能(artificial intelligence,AI)等技术猜测得到的,猜测得到的图像内容和周围环境很容易差异较大,真实性较低。
发明内容
本申请实施例公开了一种图像处理方法及电子设备,可以在通用场景下消除图像中的移动物体,用户使用方便,并且消除移动物体后的图像的真实性较高。
第一方面,本申请实施例提供了一种图像处理方法,应用于电子设备,所述方法包括:确定符合第一条件的多张图像,所述第一条件包括:所述多张图像中任意两张图像的相似程度大于或等于第一阈值,所述多张图片包括至少两张图片;从所述多张图像中确定出满足第二条件的第一图像,所述第一图像包括第一对象,所述第一对象为所述第一图像中待消除的对象;从所述多张图像中确定出第二图像,所述第二图像包括第二对象,所述第二对象在所述第二图像中的位置和所述第一对象在所述第一图像中的位置相对应;使用所述第二对象覆盖或替换所述第一对象,以得到目标图像。
本申请实施例中,电子设备可以基于多张图像进行第一对象的消除,多张图像中任意两张图像的相似程度较高。多张图像中任意一张图像可以是通过电子设备默认的拍摄模式拍摄得到的,而无需通过特定的拍摄模式获取得到,用户使用更加方便,应用场景广泛。并且,用于覆盖或替换第一对象的第二对象是根据真实的第二图像得到的,因此目标图像和真实世界的一致性更高,显示效果更好,从而提升了用户体验感。
在一种可能的实现方式中,所述第一条件还包括下述至少一种:所述多张图像中任意一张图像的拍摄时间在第一范围内、所述多张图像中任意一张图像的拍摄地点在第二范围内。
本申请实施例中,电子设备不仅可以根据图像的相似程度来确定用于实现第一对象消除 的多张图像,而且可以根据图像的拍摄时间和/或拍摄地点来确定上述多张图像,进一步保证得到的多张图像是属于同一个拍摄场景下的。基于这样的多张图像进行第一对象的消除可以提高目标图像的真实性,用户体验感更好。
在一种可能的实现方式中,所述确定符合第一条件的多张图像之前,所述方法还包括:接收第一操作,所述第一操作用于选择所述多张图像。
本申请实施例中,用户可以自行选择用于实现第一对象消除的多张图像,实现较为灵活,并且得到的目标图像也更加符合用户需求,用户体验感更好。
在一种可能的实现方式中,所述第二条件包括下述至少一种:所述第一图像中的被拍摄主体的清晰度大于或等于第二阈值,所述第一图像中除所述被拍摄主体外的其他对象的数量少于第三阈值,接收第二操作,所述第二操作用于选择所述第一图像。
本申请实施例中,用于得到目标图像的第一图像需满足第二条件,例如被拍摄主体的清晰度较高,除被拍摄主体的其他对象的数量较少。因此,得到的目标图像中被拍摄主体的显示效果也是更好的,用户体验感更好。
在一种可能的实现方式中,所述第二图像是所述多张图像中除所述第一图像外的一张图像,所述第二图像和所述第一图像的相似程度大于或等于第四阈值。
本申请实施例中,第二图像可以是多张图像中和第一图像的相似程度较高的一张图像。电子设备使用这样的第二图像中的第二对象覆盖或替换第一图像中的第一对象时,得到的目标图像的显示效果会更好,用户体验感也会更好。
在一种可能的实现方式中,所述方法还包括:从所述多张图像中确定出满足第三条件的所述被拍摄主体;所述第三条件包括下述至少一种:所述多张图像中任意一张图像内的所述被拍摄主体的清晰度大于或等于第五阈值,所述多张图像中任意一张图像的对焦点位于所述被拍摄主体所在区域,所述多张图像中任意一张图像内的所述被拍摄主体的面积大于或等于第六阈值,所述被拍摄主体属于预设类别,接收第三操作,所述第三操作用于选择所述被拍摄主体。
本申请实施例中,电子设备确定被拍摄主体的方式多种多样,电子设备可以根据自身能力灵活选择确定被拍摄主体的方式,应用场景广泛。例如,处理能力较强时,电子设备可以叠加多种方式来确定被拍摄主体,以使确定的被拍摄主体更加符合用户需求。
在一种可能的实现方式中,所述方法还包括:接收第四操作,所述第四操作用于选择所述第一对象。
本申请实施例中,用户可以自行选择待消除的对象,实现较为灵活,并且得到的目标图像也更加符合用户需求,用户体验感更好。
在一种可能的实现方式中,所述方法还包括:确定所述第一图像中第三对象的中心点、所述第一图像中第四对象的中心点、第三图像中第五对象的中心点、以及所述第三图像中第六对象的中心点;其中,所述第三图像为所述多张图像中除所述第一图像外的任意一张图像,所述第三对象和所述第五对象的属性相同,所述第四对象和所述第六对象的属性相同;将所述第三对象的中心点和所述第五对象的中心点设置为同一个坐标原点,并基于所述坐标原点建立第一坐标系;基于所述第一坐标系,确定所述第四对象的中心点和所述第六对象的中心点的第一距离;当所述第一距离大于或等于第七阈值时,确定所述第四对象为所述第一对象。
本申请实施例中,电子设备确定第一对象之前,可以先将待确定的两张图像设置为同一个第一坐标系下,从而排除位移、旋转等因素的影响,使得到的目标图像的显示效果更好,用户体验感也更好。
在一种可能的实现方式中,所述第三对象和所述第五对象表征的物体在任一时间点的位置均相同。
本申请实施例中,用于确定第一坐标系的第三对象和第五对象可以是同一个固定不变的对象(例如建筑、树、花),从而使得到的第一坐标系和世界坐标系尽可能一致,得到的目标图像和现实世界的一致性更高,显示效果更好。
在一种可能的实现方式中,所述方法还包括:接收第五操作;响应于所述第五操作,显示第一界面,其中,所述第一界面显示有所述多张图像和所述目标图像。
本申请实施例中,电子设备可以在用户无感的情况下实现第一对象的消除,并将得到的目标图像推荐给用户查看,无需用户手动触发消除功能,使用更加方便。
第二方面,本申请实施例提供了一种电子设备,上述电子设备包括至少一个存储器、至少一个处理器,上述至少一个存储器与上述至少一个处理器耦合,上述至少一个存储器用于存储计算机程序,上述至少一个处理器用于调用上述计算机程序,上述计算机程序包括指令,当上述指令被上述至少一个处理器执行时,使得上述电子设备执行本申请实施例中第一方面、第一方面的任意一种实现方式提供的图像处理方法。
第三方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当上述计算机指令在电子设备上运行时,使得上述电子设备执行本申请实施例中第一方面、第一方面的任意一种实现方式提供的图像处理方法。
第四方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行本申请实施例中第一方面、第一方面的任意一种实现方式提供的图像处理方法。
第五方面,本申请实施例提供了一种芯片,上述芯片包括至少一个处理器、接口电路、存储器,上述存储器、上述接口电路和上述至少一个处理器通过线路互联,上述存储器中存储有计算机程序,上述计算机程序被上述至少一个处理器执行时实现本申请实施例中第一方面、第一方面的任意一种实现方式提供的图像处理方法。
可以理解地,上述第二方面提供的电子设备、上述第三方面提供的计算机存储介质、第四方面提供的计算机程序产品以及第五方面提供的芯片均用于执行第一方面、第一方面的任意一种实现方式提供的图像处理方法。因此,其所能达到的有益效果可参考第一方面所提供的图像处理方法中的有益效果,不再赘述。
附图说明
以下对本申请实施例用到的附图进行介绍。
图1是本申请实施例提供的一种电子设备的硬件结构示意图;
图2是本申请实施例提供的又一种电子设备的软件架构示意图;
图3是本申请实施例提供的一种用户界面实施例的示意图;
图4是本申请实施例提供的一种分组方式的示意图;
图5-图6是本申请实施例提供的一些分组过程得到的图像组;
图7是本申请实施例提供的一种图像处理方法的流程示意图;
图8-图9、图10A-图10D、图11是本申请实施例提供的一些图像处理过程的示意图;
图12、图13A-图13B、图14-图18是本申请实施例提供的又一些用户界面实施例的示意图;
图19是本申请实施例提供的又一种图像处理方法的流程示意图。
具体实施方式
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
本申请提供了一种图像处理方法,可以应用于电子设备。该电子设备可以根据任意两张图像的相似程度对多张图像进行分组,以得到至少一个待处理图像组。任意一个待处理图像组可以包括一张第一图像和至少一张第二图像。该电子设备可以基于一个待处理图像组消除第一图像中的第一对象,即先根据至少一张第二图像得到第二对象,然后使用第二对象覆盖或替换第一图像中的第一对象。其中,上述多张图像可以是通过电子设备默认的拍摄模式拍摄得到的,而无需通过特定的拍摄模式获取,应用场景较广泛,用户使用也更方便。并且,上述第二对象是根据至少一张第二图像得到的真实可靠的图像内容,显示效果更好,从而提升了用户体验感。
可以理解地,用户通过电子设备拍摄图像时,通常是想将一个或多个真实物体保留在图像中,这一个或多个真实物体可以称为被拍摄主体。目标图像组中任意一张图像可以包括被拍摄主体,例如人物、山、树、水、天空、动物等等。但当用户通过电子设备拍摄图像时,经常会有被拍摄主体外的其他真实物体(即上述第一对象)途径拍摄区域,导致拍摄得到的图像中存在上述第一对象,例如第一图像中存在路人,多张第二图像中存在路人和途径车辆。用户通常并不想在拍摄得到的图像中保留上述第一对象,因此第一对象也可以理解为是待消除的物体。第一对象是途径拍摄区域的,因此第一对象也可以理解为是相对被拍摄主体的移动物体(简称移动物体)。
本申请实施例中涉及的电子设备可以是智慧屏、智能电视、手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、上网本、个人数字助理(Personal Digital Assistant,PDA)、可穿戴电子设备(如智能手环、智能眼镜)等设备。
接下来介绍本申请实施例中提供的示例性的电子设备。
请参见图1,图1示出了一种电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申 请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
在一些实施例中,电子设备100可以配置有多个摄像头193,这多个摄像头193可包括前置摄像头和后置摄像头。可选地,前置摄像头也可以是多个,前置摄像头例如可设置于电子设备100正面的顶端。可选地,后置摄像头也可以是多个,例如后置的广角摄像头、后置的超广角摄像头、后置的长焦摄像头。后置摄像头例如可设置于电子设备100的背面。在本申请一些实施例中,多个摄像头193还可以是升降式摄像头、可拆卸式摄像头等,本申请实施例对多个摄像头193和电子设备100的连接方式以及机械机构没有限定。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
本申请实施例中,电子设备100可以通过摄像头193获取并保存多张图像,这多张图像可以保存在内部存储器121中,或者外部存储器接口120连接的外部存储卡中。然后,电子设备100的处理器110可以根据相似程度对这多张图像进行分组,以得到至少一个待处理图像组。例如但不限于通过拍摄时间的差值、拍摄地点的距离差值、图像特征向量的距离、角度等表征两张图像之间的相似程度。基于得到的待处理图像组,处理器110可以进行移动物体的识别和消除,例如使用真实图像覆盖移动物体所在区域,该真实图像可以是根据待处理图像组中至少一张图像得到的。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图2是本发明实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将
Figure PCTCN2021135041-appb-000001
系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。在本申请中,图2所示的软 件框架仅仅是一个示例,电子设备100的系统还可以是其他操作系统,诸如
Figure PCTCN2021135041-appb-000002
华为移动服务(huawei mobile services,HMS)等。
应用程序层可以包括一系列应用程序。
如图2所示,应用程序可以包括相机,图库,地图,音乐,短信息,日历,通话,导航,蓝牙,文件管理等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
可以理解地,相机或图库等应用程序可以包括移动物体消除的功能,用户可以通过相机或图库等应用程序使用上述移动物体消除的功能,以此获取消除移动物体后的图像。不限于 此,移动物体消除也可以是一个安装在电子设备100上的应用程序,或者是在线的应用,例如网页应用、小程序应用等,本申请实施例对此不作限定。
为了方便描述,以下实施例以移动物体消除是图库应用中包含的功能为例进行说明。
下面结合拍照场景,示例性说明电子设备100软件以及硬件的工作流程。
当压力传感器180A和/或触摸传感器180K接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为相机应用的拍照控件为例,相机应用调用应用框架层的接口,进而调用内核层启动摄像头驱动,通过摄像头193拍摄一张或多张照片。这一张或多张照片可以保存为图库(又可称为相册)中的多张图片(又可称为图像)。
请参见图3,图3示例性示出了智能手机等电子设备上的相机应用的一个用户界面30(这里的电子设备可以对应于前述的电子设备100)。其中,电子设备可以检测作用于相机应用的图标的触控操作(例如点击操作),该相机应用的图标可以在电子设备的桌面,电子设备的桌面可以包括多个应用程序的图标。响应于上述触控操作,电子设备可以显示图3所示的用户界面30。用户界面30可以是相机应用的默认拍照模式的用户界面,可用于用户通过电子设备默认的后置摄像头进行拍照。也就是说,用户可以点击相机应用图标来打开相机应用的用户界面30。不限于此,用户还可以在其他应用程序中打开用户界面30,例如用户在社交类应用程序中点击拍摄控件来打开用户界面30。
如图3所示,用户界面30可以包括:区域301、拍摄功能列表302、拍摄模式列表303、控件304、控件305、控件306。其中:
区域301可以称为预览框301或取景框301。预览框301可用于显示摄像头193实时采集的图像,电子设备可以实时刷新其中的显示内容,以便于用户预览摄像头193当前的采集的图像。
拍摄功能列表302中可以显示有至少一个拍摄功能选项:智慧视觉选项302A、闪光灯选项302B、动态照片选项302C、色彩模式选项302D、相机设置选项302E。
示例性地,电子设备可以检测用户作用于动态照片选项302C的用户操作(例如点击操作),以此开启或关闭拍摄动态照片的功能。当开启拍摄动态照片的功能时,电子设备可以检测到触发拍照的用户操作,响应于该用户操作,电子设备可以拍摄多帧图像,并将这多帧图像编码为视频,该视频即为动态照片。例如,电子设备可以拍摄40帧的图像,并将这40帧的图像编码为24每秒传输帧数(frames per second,fps)的视频(即动态照片),该视频的时长为1.7秒。
拍摄模式列表303中可以显示有至少一个拍摄模式选项:光圈模式选项303A、夜景模式选项303B、人像模式选项303C、拍照模式选项303D、录像模式选项303E、专业模式选项303F、更多模式选项303G。图3中,拍照模式选项303D为选中状态,用于表示电子设备当前的拍摄模式为拍照模式,拍照模式可以为电子设备默认的拍摄模式。电子设备可以检测作用于拍摄模式列表303中其它拍摄模式选项的用户操作(例如点击操作),响应于该用户操作,电子设备可以切换拍摄模式。
控件304可用于监听触发拍摄(拍照或录像)的用户操作。电子设备可以检测到作用于控件304的用户操作(例如点击操作),响应于该操作,电子设备可以将预览框301中的图像 保存为图库应用中的图片或视频。也就是说,用户可以点击控件304来触发拍摄。图库应用可以支持用户对存储于电子设备上的图片或视频进行各种操作,例如浏览、编辑、删除、选择等操作。并且,电子设备还可以在控件305中显示所保存的图像的缩略图。
控件306可用于监听触发翻转摄像头的用户操作。电子设备可以检测作用于控件306的用户操作(例如点击操作),响应于该操作,电子设备可以切换用于获取图像的摄像头,例如将用于获取图像的摄像头从后置摄像头切换为前置摄像头。
本申请中,电子设备可以通过摄像头193拍摄并存储多张图片(也可称为图像)。电子设备可以根据任意两张图像之间的相似程度对上述多张图像进行分组,以得到至少一个待处理的图像组(简称第一分组)。这至少一个第一分组用于电子设备实现移动物体的消除。其中,这里的电子设备可以对应于前述的电子设备100。
电子设备进行分组时,首先可以针对每张图像进行图像特征的提取。电子设备可以采用传统的计算机视觉(computer vision,CV)算法进行图像特征的提取,例如采用尺度不变特征变换(scale-invariant feature transform,SIFT)、加速稳健特征(speeded up robust features,SURF)进行角点检测和特征表达。电子设备也可以采用深度学习(deep learning,DL)算法,例如卷积神经网络(Convolutional Neural Networks,CNN),进行图像特征的提取。提取到图像的特征向量后,电子设备可以计算任意两张图像的特征向量的距离或夹角等参数,并通过该参数判断这两张图像之间的相似程度。当相似程度大于或等于第一阈值时,电子设备确定这两张图像满足相似条件。
示例性地,电子设备可以计算任意两张图像的特征向量的欧式距离,其中,欧式距离越小,表示这两张图像之间的相似程度越大,欧式距离越大,表示这两张图像之间的相似程度越小。或者,电子设备也可以计算任意两张图像的特征向量的余弦距离,其中,余弦距离越小,表示这两张图像之间的相似程度越大,余弦距离越大,表示这两张图像之间的相似程度越小。
在一些实施例中,电子设备也可以在计算相似程度之前,根据拍摄时间对电子设备存储的多张图像进行处理,以得到满足预设时间条件的第二分组。然后电子设备再基于第二分组进行相似程度的判断。其中,预设时间条件包括:第二分组中任意一张图像的拍摄时间在第一范围内,也可以理解为第二分组中任意两张图像的拍摄时间的差值小于或等于第一时间阈值。例如,图库应用中包括未进行分组的10张图像。这10张图像为同一天拍摄,拍摄时间分别为:9点10分、9点11分、9点11分、9点15分、10点10分、10点15分、11点21分、14点35分、14点35分、14点36分。电子设备根据拍摄时间对这10张图像进行分组,第一时间阈值为5分钟。因此,拍摄时间为9点10分、9点11分、9点11分、9点15分的四张图像属于分组1,拍摄时间为10点10分、10点15分的两张图像属于分组2,拍摄时间为11点21分的一张图像属于分组3,拍摄时间为14点35分、14点35分、14点36分的三张图像属于分组4。也就是说,电子设备得到了分组1、分组2、分组3、分组4这四个第二分组。
在一些实施例中,电子设备也可以在计算相似程度之前,根据拍摄地点对电子设备存储的多张图像进行处理,以得到满足预设地点条件的第三分组,具体示例如下图4所示。然后电子设备再基于第三分组进行相似程度的判断。其中,预设地点条件包括:第二分组中任意一张图像的拍摄地点在第二范围内,也可以理解为第二分组中任意两张图像的拍摄地点的距离差值小于或等于第一距离阈值。本申请中,任意一张图像的拍摄地点可以是电子设备通过 GPS等技术获取得到的,拍摄地点可以用经度和纬度表示,例如,拍摄地点为武汉市政府时,经度为114.305215,纬度为0.592935,则拍摄地点可表示为(114.305215,30.592935)。
请参见图4,图4示例性示出了电子设备通过GPS等技术获取到的地图范围40。地图范围40中存在四个位置:位置401、位置402、位置403和位置404,其中,位置401为图像A的拍摄地点,位置402为图像B的拍摄地点,位置403为图像C的拍摄地点,位置404为图像D的拍摄地点。图像A、图像B、图像C、图像D为电子设备存储的多张图像。需要说明的是,图像A、图像B、图像C、图像D中任意一个图像可以包括一张或多张图像。
如图4所示,以位置401为圆心,第一距离阈值为半径的圆形为范围411,即范围411内的任意位置和位置401的距离差值小于或等于第一距离阈值。类似地,以位置402为圆心,第一距离阈值为半径的圆形为范围412,即范围412内的任意位置和位置402的距离差值小于或等于第一距离阈值。以位置403为圆心,第一距离阈值为半径的圆形为范围413,即范围413内的任意位置和位置403的距离差值小于或等于第一距离阈值。以位置404为圆心,第一距离阈值为半径的圆形为范围414,即范围414内的任意位置和位置404的距离差值小于或等于第一距离阈值。
因此,从图4可以得到,位置401和位置402、位置403的距离差值小于第一距离阈值,位置402和位置403的距离差值小于第一距离阈值,位置403和位置404的距离差值小于第一距离阈值。则电子设备可以将图像A、图像B、图像C划分为一个第三分组,将图像C和图像D划分为另一个第三分组。
不限于上述列举的情况,在具体实现中,电子设备也可以通过拍摄时间和/或拍摄地点来度量两张图像之间的相似程度。即拍摄时间的差值越小,相似程度越大,拍摄时间的差值越大,相似程度越小。类似地,拍摄地点的距离差值越小,相似程度越大,拍摄地点的距离差值越大,相似程度越小。或者,电子设备也可以先根据拍摄时间和拍摄地点对电子设备存储的图像进行处理,以得到满足预设时间条件和预设地点条件的第四分组。然后电子设备再基于第四分组进行相似程度的判断,以得到至少一个第一分组。本申请对获取第一分组的具体方式不作限定。
在一些实施例中,电子设备也可以先对存储的多张图像进行焦距配准,即将每张图像的焦距设置为同一焦距。然后,电子设备再基于焦距配准后的多张图像进行分组,以得到至少一个第一分组,从而减小处理误差。不限于此,电子设备也可以先对存储的多张图像进行角度配准,例如控制任意两张图像中的被拍摄主体之间的角度小于或等于5度,然后再基于角度配准后的多张图像进行分组。
可以理解地,电子设备可以按照上述分组过程对电子设备存储的多张图像进行处理,以得到满足第一条件的第一分组。其中,第一条件包括:第一分组中任意两张图像的相似程度大于或等于第一阈值,即第一分组中任意两张图像满足相似条件。第一分组的示例可参见图5所示的图像组A和图6所示的图像组B,其中,图5所示的图像组A可以包括四张图像:图像501、图像502、图像503、图像504。图6所示的图像组B可以包括四张图像:图像601、图像602、图像603和图像604。
不限于上述列举的情况,在具体实现中,电子设备处理的任意一张图像也可以是从保存的视频中提取的一帧图像。例如,电子设备可以通过AI技术从视频中提取和第一图像的相似程度大于或等于第一阈值的至少一帧图像。这至少一帧图像和第一图像属于一个第一分组。
本申请中,电子设备可以对上述得到的每个第一分组进行移动物体的消除,具体过程如 下图7所示。其中,图7以图6所示的图像组B为第一分组进行说明。
请参见图7,图7示例性示出一种图像处理方法的流程示意图。该方法可以应用于图1所示的电子设备100。该方法也可以应用于图2所示的电子设备100。该方法包括但不限于如下步骤:
S701:电子设备对第一分组中的图像进行语义分割。
具体地,电子设备可以通过语义分割识别出图像中包括的对象,具体示例如下图8所示。
请参见图8,图8示例性示出一种语义分割前后的对比示例。图8以对图6所示的图像601进行语义分割为例进行说明。图8的(A)所示的图像为语义分割前的图像601,图8的(B)所示的图像为语义分割后的图像601。如图8的(B)所示,语义分割后,图像601可以包括人物A、人物B、人物C、建筑、树、汽车。电子设备对图6所示的图像组B中其它图像进行语义分割的过程和图8类似,其中图像602还包括气球,图像603和图像601一致,图像604不包括汽车。
不限于图8示例的情况,在具体实现中,语义分割后,图像包括的对象例如为:人物、建筑、汽车、绿植(包括草地、树、花)、美食、宠物、水、沙滩、山峰,本申请对对象的具体类型不作限定。
S702:电子设备确定第一分组中的被拍摄主体。
具体地,第一分组中任意一张图像包括被拍摄主体。本申请可以将第一分组中每张图像均包括的对象称为第一待测对象。针对每个第一待测对象,电子设备可以首先获取以下至少一项:清晰度、所占面积、是否属于第一预设类别、对焦点所在区域是否位于第一待测对象所在区域。然后,基于上述获取的内容确定满足第一预设条件的第一待测对象为被拍摄主体。第一预设条件可以包括以下至少一项:清晰度大于或等于第一预设阈值,所占面积大于或等于第二预设阈值,属于第一预设类别,对焦点所在区域位于第一待测对象所在区域。其中,上述清晰度可以但不限于通过图像中相邻像素的灰度差或梯度来表征。例如通过Brenner梯度函数、Tenengrad梯度函数、Laplacian梯度函数等算法计算得到的值来表征图像的清晰度,得到的值越大,表示图像的清晰度越高,得到的值越小,表示图像的清晰度越低。
其中,第一预设类别可以是电子设备根据历史图像等信息预先得到的对象所属分类,例如人物、宠物、建筑、风景等。示例性地,假设电子设备可以根据历史图像获取到第一人物的人脸特征向量,并将第一人物的身份识别为孩子(例如用户直接标记人物的身份)。当第一待测对象的人脸特征向量和第一人物的人脸特征向量匹配时(如相似程度大于第三预设阈值时),电子设备可以将该对象的身份识别为孩子,即第一待测对象属于第一预设类别。其中,人脸特征向量表征用户的人脸信息,例如可以包括五官、脸型的面积和形状等。
需要说明的是,上述清晰度、所占面积可以是第一分组中任意一张图像中第一待测对象的清晰度、所占面积,上述对焦点所在区域也是第一分组中任意一张图像中的对焦点所在区域。不限于此,上述清晰度、所占面积也可以是第一分组中预设数量张图像中第一待测对象的清晰度、所占面积,上述对焦点所在区域也是第一分组中预设数量张图像中的对焦点所在区域,本申请对此不作限定。
示例性地,假设第一预设条件包括:所占面积最大、属于第一预设类别。其中,假设第一预设类别包括人物、宠物。而在图6所示的图像组B中,每张图像均包括的对象有人物A、人物B、人物C、建筑和树。其中,人物A所占面积最大,并且人物A属于第一预设类别,因此电子设备可以将人物A确定为图像组A的拍摄主体。
在一些实施例中,第一分组中的任意一个第一待测对象可以存在对应的优先级,电子设 备可以将优先级最高的第一待测对象确定为第一分组的拍摄主体。其中,对象的优先级可以由以下至少一项决定:清晰度、所占面积、是否属于第一预设类别、对焦点所在区域是否位于第一待测对象所在区域。
示例性地,第一待测对象的优先级由清晰度、所占面积和是否属于第一预设类别决定。第一待测对象的优先级可以表示为W。清晰度在计算W时表示为qa,所占的权值为wa。所占面积在计算W时表示为qb,所占的权值为wb。是否属于第一预设类别在计算W时表示为qc,所占的权值为wc。因此,W的表达式可以如下所示:
W=wa×qa+wb×qb+wc×qc
其中,wa+wb+wc=1。例如,wc>wb>wa,不限于此,也可以是wc>wa>wb,本申请对权值的具体取值不作限定。
其中,qc的取值可以为0或1。当qc取值为0时,表示第一待测对象不属于第一预设类别,当qc取值为1时,表示第一待测对象属于第一预设类别。不限于此,qc取值不同时,还可以表示第一待测对象所属的具体类别,本申请对qa、qb、qc的取值方式不作限定。
示例性地,第一待测对象的优先级仅由第一待测对象的清晰度决定。当第一待测对象的清晰度越高时,第一待测对象的优先级越高。
示例性地,第一待测对象的优先级仅由所占面积决定。当所占面积越大,第一待测对象的优先级越高。
示例性地,第一待测对象的优先级仅由是否属于第一预设类别决定,可选地,还可以由所属的具体类别决定。当第一待测对象属于第一预设类别时,该对象的优先级可以提升。或者,假设第一预设类别包括人物和建筑,第一待测对象属于人物时,优先级提升较多,属于建筑时,优先级提升较少。或者,假设第一预设类别包括人物,且包括人物的具体身份:亲人、朋友。第一待测对象属于亲人时,优先级提升较多,属于朋友时,优先级提升较少,仅属于人物,但不属于亲人和朋友时,优先级提升最少。
S703:电子设备确定第一分组中的第一图像。
具体地,电子设备可以从第一分组中确定出满足第二条件的第一图像,第二条件包括以下至少一项:第一图像中被拍摄主体的清晰度大于或等于第二阈值,第一图像中除被拍摄主体外的其他对象的数量少于第三阈值,第一图像中的被拍摄主体未被遮挡,第一图像中的被拍摄主体的状态为预设状态。其中,电子设备可以基于语义分割的结果确定除被拍摄主体外的其他对象的数量。不限于此,电子设备也可以通过AI等技术识别图像包括的对象,以此确定其他对象的数量。
电子设备可以通过被拍摄主体在第一分组中的相似程度是否变化,以此判断被拍摄主体是否被遮挡。示例性地,基于第一分组,电子设备可以获取任意一张图像和其他图像中被拍摄主体的相似程度,当相似程度均小于第四预设阈值时,电子设备可以确定当前图像中的被拍摄主体存在显著性的特征变化,即确定当前图像中的被拍摄主体被遮挡。
电子设备可以通过人工智能(artificial intelligence,AI)等技术识别被拍摄主体的状态。例如,拍摄主体为人时,被拍摄主体的状态可以包括微笑、哭泣等表情,直立、斜靠、蹲下等姿态。被拍摄主体为猫、狗等宠物时,被拍摄主体的状态可以包括趴下、站立、奔跑等姿态。被拍摄主体为汽车、自行车等物体时,被拍摄主体的状态可以包括停止、行驶等。
示例性地,图6所示的图像组B中,被拍摄主体为人物A,假设第二条件包括:除被拍摄主体外的其他对象的数量最少,被拍摄主体未被遮挡。图像602中的人物A被遮挡,因此图像602不作考虑。图像601和图像603中除人物A外还包括五个对象:人物B、人物C、 汽车、建筑、树,而图像604中除人物A外还包括四个对象:人物B、人物C、建筑、树,不包括汽车。因此,电子设备可以将图像604确定为图像组B的第一图像。
在一些实施例中,第一分组中的任意一张图像可以存在对应的优先级,电子设备可以将优先级最高的图像确定为第一分组的第一图像。其中,图像的优先级可以由以下至少一项决定:被拍摄主体的清晰度、除被拍摄主体外的其他对象的数量、被拍摄主体是否被遮挡、被拍摄主体的状态。
示例性地,图像的优先级由图像中被拍摄主体的清晰度、除被拍摄主体外的其他对象的数量、被拍摄主体是否被遮挡决定。图像的优先级可以表示为U。被拍摄主体的清晰度在计算U时表示为qd,所占的权值为wd。被拍摄主体是否被遮挡在计算U时表示为qe,所占的权值为we。除被拍摄主体外的其他对象的数量在计算U时表示为qf,所占的权值为wf。因此,U的表达式可以如下所示:
U=wd×qd+we×qe+wf×qf
其中,wd+we+wf=1。例如,wf>we>wd,不限于此,也可以是wf>wd>we,本申请对权值的具体取值不作限定。
其中,qf的取值可以小于或等于0。当qf取值为0时,表示除被拍摄主体外的其他对象的数量为0。当qf取值小于0时,qf越小,表示除被拍摄主体外的其他对象的数量越多,qf越大,表示除被拍摄主体外的其他对象的数量越少。不限于此,qf的取值也可以大于或等于0,本申请对qd、qe、qf的取值方式不作限定。
示例性地,图像的优先级仅由图像中被拍摄主体的清晰度决定。当图像中被拍摄主体的清晰度越高时,该图像的优先级越高。
示例性地,图像的优先级仅由图像中被拍摄主体是否被遮挡决定。当图像中被拍摄主体未被遮挡时,该图像的优先级可以提高,当图像中被拍摄主体被遮挡时,该图像的优先级可以降低。
示例性地,图像的优先级仅由被拍摄主体的状态决定。假设图像中的被拍摄主体为人物,人物的五官、表情等即为被拍摄主体的状态。当人物的眼睛睁开时,该图像的优先级可以提高,当人物的表情为笑着时,该图像的优先级可以提高。
示例性地,图像的优先级仅由图像中除被拍摄主体外的其他对象的数量和面积决定。当图像中除被拍摄主体外的其他对象的数量越少时,该图像的优先级越高,当图像中除被拍摄主体外的其他对象的面积越小时,该图像的优先级越高。
S704:电子设备确定第一分组中的第一对象。
具体地,本申请可以将第一分组中除被拍摄主体外的任意一个对象称为第三对象,电子设备可以获取第一图像中的第三对象和第一分组的其他图像中第三对象之间的距离,当该距离大于或等于第五预设阈值时,电子设备可以将该第三对象确定为第一对象。第一对象即为待消除的移动物体。
在一些实施例中,电子设备确定第一分组中的第一对象时,首先要进行坐标配准,即将第一分组中的图像配置在同一个坐标系下。该坐标系可以是二维坐标系,也可以是三维坐标系,本申请以二维坐标系为例进行说明。本申请可以将第一分组中任意两张图像称为第一待测图像和第二待测图像,接下来示例性说明第一待测图像和第二待测图像的坐标配准过程。
电子设备首先可以获取第一待测图像中的至少一个第一关键点和第二待测图像中的至少一个第二关键点,其中,第一关键点和第二关键点的数量相同。一个第一关键点对应一个第二关键点,即第一关键点和第二关键点的相似程度大于或等于第六预设阈值。例如,第一待测图像为图像604,第一关键点为图像604中人物A的左眼的中心点,第二待测图像为图像 603,第二关键点为图像603中人物A的左眼的中心点。第一关键点和第二关键点的数量可以表示为n,则第一待测图像包括的第一关键点可以表示为序列P 1{p 11(x 11,y 11),p 12(x 12,y 12),…,p 1n(x 1n,y 1n)},第二待测图像包括的第二关键点可以表示为序列P 2{p 21(x 21,y 21),p 22(x 22,y 22),…,p 2n(x 2n,y 2n)}。假设第一待测图像所在坐标系为标准坐标系,第二待测图像需经过旋转和平移才会在标准坐标系下,其中,旋转值可以表示为R(x r,y r),平移值可以表示为T(x t,y t)。P 1、P 2、R、T满足下式:
P 1=P 2×[R|T]
电子设备可以采用矩阵求逆的方式得到旋转值R和平移值N,然后将第二待测图像按照R旋转,按照N平移。此时,第一待测图像和第二待测图像在同一个标准坐标系下,第一关键点和对应的第二关键点重合。
在一些实施例中,为了使建立的标准坐标系和世界坐标系尽可能一致,选取的第一关键点和第二关键点可以位于被拍摄主体上,也可以位于一个或多个在任一时间点的位置均不变的对象上,例如建筑、绿植(包括草地、树、花)、沙滩、山峰等等。
电子设备可以在上述标准坐标系下,获取不同图像中第三对象的中心点,并计算这些中心点的距离。当任意一个距离大于或等于第五预设阈值时,电子设备可以确定第三对象为待消除的移动物体(即第一对象),具体示例如下图9所示。
请参见图9,图9示例性示出一种确定第一对象的示意图。图9以待确认的第三对象为图6所示的图像组A中的人物B为例进行说明。
如图9所示,假设以O点为坐标原点建立的二维坐标系为上述坐标配准得到的标准坐标系。背景为灰色的图像为第一图像(即图像604),区域900为图像604中的人物A(即被拍摄主体)所在的区域,O点为图像604中的人物A的中心点。图像组A的其他图像中人物A的中心点和O点重合,人物A所在区域也和区域900的重合,其中,图像601所在区域和图像604所在区域完全重合。
如图9所示,区域6010为图像601中人物B所在的区域,区域6020为图像602中人物B所在区域。区域6010和区域6020的重叠程度大于第六预设阈值,因此电子设备可以认为人物B在图像601和图像602中的位移为0。区域6030为图像603中人物B所在的区域,区域6010或区域6020的中心点和区域6030的中心点的距离为第一距离d 1。区域6040为图像604中人物B所在的区域,区域6030的中心点和区域6040的中心点的距离为第二距离d 2。相应地,区域6010或区域6020的中心点和区域6040的中心点的距离为d 1+d 2。当d 1、d 2、d 1+d 2中任意一项大于第二距离阈值时,电子设备可以将人物B识别为待消除的移动物体(即第一对象)。
可以理解地,电子设备也可以按照S704的方式将图6所示的图像组B中的人物C、汽车也识别为待消除的移动物体(即第一对象),具体过程和图9所示实施例类似,不再赘述。
在一些实施例中,若第一图像包括第三对象,但第一分组中除第一图像外的其他图像不包括第三对象,则电子设备也可以确定第三对象为待消除的移动物体(即第一对象)。
本申请中任意一个物体的中心点可以是将该物体转换为一个矩形时该矩形的中心点。其中,将该物体转换为一个矩形时,可以将该物体中最宽的线段作为矩形的一组对边,最高的线段作为矩形的另一组对边。不限于此,也可以是直接获取不规则物体的重心作为该物体的中心点。
在一些实施例中,电子设备可以先将第一分组中每张图像的焦距设置为同一焦距,然后再进行坐标配准,从而减小处理误差。
S705:电子设备消除第一分组的第一图像中的第一对象,以得到目标图像。
具体地,电子设备首先可以从第一分组中确定出包括第二对象的第二图像。第二图像为 第一分组中除第一图像外的其他图像,第二图像的数量至少为一张,第二对象用于覆盖或替换第一图像中的第一对象。其中,第二对象在上述坐标配准得到的标准坐标系中的位置和第一对象在上述标准坐标系中的位置相同。
示例性地,如图9所示,第一图像(即图像604)包括待消除的移动物体:人物B,人物B所在区域为区域6040。电子设备可以将不规则的区域6040转换为图10A所示的矩形1040,矩形1040的位置可以表示为S{x min,x max,y min,y max},此时第一对象可以等同于矩形1040。电子设备可以基于上述标准坐标系确定第一分组的其他图像中位置S所在的区域,具体示例如图10B-图10D所示。其中,图10B所示的区域1010为图像601中位置S所在的区域,图10C所示的区域1020为图像602中位置S所在的区域,图10D所示的区域1030为图像603中位置S所在的区域。假设区域1010和区域1020的相似程度大于或等于第七预设阈值,区域1030和区域1010、区域1020的相似程度均小于第七预设阈值,则可以将区域1010和区域1020中任意一个作为第二对象。
假设图像601为电子设备确定的第二图像,及区域1010为电子设备确定的第二对象。则如图11所示,电子设备可以使用图11的(A)所示的图像601(即第二图像)中的区域1010(即第二对象),覆盖或替换图11的(B)所示的图像604(即第一图像)中的区域1040(即第一对象),以得到图11的(C)所示的目标图像1100,其中目标图像1100不包括人物B(即移动物体)。
不限于上述列举的情况,在具体实现中,第二图像也可以有多个,第二对象也可以是根据多个第二图像拼接得到的图像内容。
在一些实施例中,电子设备使用第二对象覆盖或替换第一对象之后,电子设备还可以对目标图像中第二对象的边缘进行处理,以使第二对象和目标图像的其他图像内容更加协调,过渡更加自然,真实性更强,用户体验感也更好。
本申请中,电子设备可以按照图4-图9、图10A-图10D、图11所示实施例获取目标图像,并将目标图像推荐给用户,具体示例如图12、图13A-图13B所示。用户无需手动触发消除移动物体的过程,用户使用更为方便。
请参见图12,图12示例性示出了智能手机等电子设备上的图库应用的一个用户界面120。其中,电子设备可以检测作用于图库应用的图标的触控操作(例如点击操作),该图库应用的图标可以在电子设备的桌面(又可称为电子设备的主界面)。响应于上述触控操作,电子设备可以显示图12所示的用户界面120。用户界面120可以是图库应用的主界面。也就是说,用户可以点击图库应用的图标来打开图库应用的用户界面120。不限于此,用户还可以在其他应用程序中打开用户界面120,例如用户在社交类应用程序中点击相册控件来打开用户界面120,用户点击相机应用的用户界面30中的控件305来打开用户界面120。
如图12所示,用户界面120可以包括控件121、相册列表122、图库功能列表123。其中:
控件121可以称为搜索栏121。搜索栏121可以用于接收用户输入的信息,电子设备可以根据用户输入的信息对电子设备存储的图片或视频进行搜索,以此得到和用户输入的信息匹配的图片或视频,并将匹配的图片或视频展示给用户。
相册列表122可以包括一个或多个图像分类,例如可以包括相机分类122A、所有图片分类122B、相似图片分类122C等等。每个图像分类可以包括一个或多个图片或视频。电子设备可以根据图片或视频的来源、内容等将这些图片或视频划分为上述一个或多个图像分类。例如,电子设备通过摄像头193拍摄得到的图片和视频属于相机分类122A。电子设备通过摄 像头193拍摄得到的、从其他设备获取的、从互联网上下载的图片属于所有图片分类122B。相似图片分类122C可以包括:电子设备对存储的多张图片进行分组,得到的至少一个第一分组中的图像。以下实施例以相似图片分类122C包括两个第一分组:分组1和分组2,其中分组1为图5所示的图像组A为例进行说明。
图库功能列表123可以包括一个或多个功能选项,例如可以包括照片功能选项123A、图库功能选项123B、时刻功能选项123C、发现功能选项123D。其中,电子设备可以检测用户作用于照片功能选项123A的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示通过摄像头193拍摄得到的图片和视频。不限于此,电子设备也可以检测用户作用于相机分类122A的触控操作(例如点击操作),响应于该触控操作,电子设备也可以显示通过摄像头193拍摄得到的图片和视频。图库功能选项123B为选中状态时,电子设备可以显示图12所示的用户界面120。
请参见图13A,图13A示例性示出了智能手机等电子设备上的图库应用的又一个用户界面130。其中,电子设备可以检测到作用于图12所示的用户界面120中的相似图片分类122C的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图13A所示的用户界面130。
如图13A所示,用户界面130可以包括控件131、相似图片列表132、区域133。其中:
控件131可以显示文字信息:相似图片(分组1)。电子设备可以检测用户作用于控件131的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图13B所示的用户界面130。其中,图13B所示的用户界面130包括选项列表134,选项列表134包括相似图片(全部)134A、相似图片(分组1)134B、相似图片(分组2)134C。相似图片(分组1)134B为选中状态时,电子设备可以显示图13A和图13B所示的用户界面130。用户界面130的相似图片列表132包括的图像为电子设备分组得到的一个第一分组的图像。电子设备可以检测作用于相似图片(全部)134A的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示分组得到的全部第一分组(即分组1和分组2)的图像。电子设备也可以检测作用于相似图片(分组2)134C的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示分组得到的另一个第一分组(例如图6所示的图像组B)的图像。
相似图片列表132可以包括图像132A、图像132B、图像132C和图像132D,这四张图像为电子设备分组得到的一个第一分组:图5所示的图像组A中的图像。
区域133可以包括标题133A和区域133B。标题133A用于显示文字信息:智能推荐。区域133B可以显示有文字信息:推荐“移动物体消除”。电子设备可以在区域133B显示:电子设备基于分组1(即图5所示的图像组A)进行移动物体的消除,得到的目标图像的缩略图。电子设备可以检测作用于区域133B的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示上述目标图像。电子设备显示上述目标图像时,用户可以对该目标图像进行各种操作,例如编辑、删除、选择等操作。
在一些实施例中,电子设备也可以接收用户操作,该用户操作用于选择多张图像和触发消除移动物体的功能。响应于该用户操作,电子设备可以将用户选择的多张图像识别为一个待处理的图像组(即第一分组),然后基于该第一分组进行移动物体的消除。也就是说,电子设备可以基于用户手动选择的图像组进行移动物体的消除,具体示例如图14-图15所示。
请参见图14,图14示例性示出了一种人机交互示意图。其中,图14的(A)所示的用户界面141为用户点击控件1413D之前,选择多张图片的用户界面,图14的(B)所示的用 户界面142为用户点击控件1413D之后的用户界面。
如图14的(A)所示,用户界面141可以包括标题1411、图片列表1412、图片功能选项1413。其中:
标题1411可以包括控件1411A和文字信息1411B。文字信息1411B可以由用户选择的图片的数量决定。图14的(A)所示的用户界面141中,文字信息1411B为:已选择4项,用于表征用户已选择的图片的数量为4。
图片列表1412可以包括一张或多张图片,例如可以包括图片1412A、图片1412B、图片1412C、图片1412D、图片1412E、图片1412F。图片1412A可以包括选择框1412A-1,图14的(A)所示的选择框1412A-1为选中状态,用于表征用户已选择图片1412A。类似地,图片1412B可以包括选择框1412B-1,图片1412D可以包括选择框1412D-1,图片1412E可以包括选择框1412E-1。图14的(A)所示的选择框1412B-1、选择框1412D-1、选择框1412E-1均为选中状态,用于表征用户已选择图片1412B、图片1412D、图片1412E。图片1412C可以包括选择框1412C-1,图片1412F可以包括选择框1412F-1。图14的(A)所示的选择框1412C-1、1412F-1均为非选中状态,用于表征用户未选择图片1412C和图片1412F。
图片功能选项1413可以包括一个或多个功能选项,例如可以包括分享功能选项1413A、删除功能选项1413B、全选功能选项1413C、移动物体消除功能选项1413D、更多功能选项1413E。
电子设备可以检测作用于移动物体消除功能选项1413D的触控操作(例如点击操作)。响应于该触控操作,电子设备确定用户选择图片1412A、图片1412B、图片1412D、图片1412E。然后,电子设备可以获取这四张图片中任意两张图片的相似程度,获取相似程度的说明可参见上述分组过程的描述,不再赘述。假设上述任意两张图片的相似程度大于或等于第一阈值,则电子设备确定这四张图片为一个待处理的图像组(即第一分组)。电子设备可以基于该第一分组进行移动物体的消除,以得到消除移动物体后的目标图像,具体过程可参见上图7所示实施例,不再赘述。也就是说,用户可以手动选择待处理的多张图片(即第一分组),并通过点击移动物体消除功能选项1413D来触发消除移动物体的功能。得到目标图像后,电子设备可以显示图14的(B)所示的用户界面142。
如图14的(B)所示,用户界面142可以包括图片列表1421和提示框1422。其中,提示框1422可以包括提示信息和区域1422A。区域1422A可以用于显示消除移动物体后的目标图像的缩略图,提示框1422可以包括文字信息:“移动物体消除”得到的图片已存储在“所有图片”中。通过提示框1422中的文字信息可以知道:电子设备将目标图像存储在图库应用中,且目标图像属于所有图片分类122B。图片列表1421可以包括区域1421A和图14的(A)所示的图片列表1412中的图片,区域1421A用于显示消除移动物体后的目标图像的缩略图。区域1421A中显示的目标图像和区域1422A中显示的目标图像的面积可以不同。
可以理解地,电子设备可以检测作用于控件1411A的触控操作(例如点击操作),响应于该触控操作,电子设备可以取消显示选择框1412A-1、选择框1412B-1、选择框1412C-1、选择框1412D-1、选择框1412E-1、选择框1412F-1、图片功能选项1413。并且,响应于该触控操作,电子设备可以将文字信息1411B更改为所有图片。此时电子设备显示的用户界面可以是:用户点击图12所示的用户界面120中的所有图片分类122B后,响应于该点击操作电子设备显示的用户界面。
可以理解地,若用户选择的多张图片不满足要求,例如存在相似程度小于第一阈值的两张图片,电子设备无法基于用户选择的多张图片进行移动物体的消除。因此,电子设备可 以提示用户重新选择图片,具体示例可参见图15所示实施例。
请参见图15,图15示例性示出了又一种人机交互示意图。其中,图15的(A)所示的用户界面141为用户点击控件1413D之前,选择多张图片的用户界面,图15的(B)所示的用户界面150为用户点击控件1413D之后的用户界面。
如图15的(A)所示,用户界面141和图14的(A)所示的用户界面141类似,只是用户选择的图片变更为:图片1412A、图片1412C、图片1412F,文字信息1411B也对应更改为“已选择3项”。
电子设备可以检测作用于移动物体消除功能选项1413D的触控操作(例如点击操作)。响应于该触控操作,电子设备确定用户选择图片1412A、图片1412C、图片1412F。然后,电子设备可以获取这三张图片中任意两张图片的相似程度,获取相似程度的说明可参见上述分组过程的描述,不再赘述。假设上述任意两张图片的相似程度小于第一阈值,则电子设备确定这三张图片无法作为一个第一分组进行处理。此时,电子设备会显示图15的(B)所示的用户界面150。
如图15的(B)所示,用户界面150可以包括图片列表151和提示框152。其中,图片列表151可以包括图15的(A)所示的图片列表1412中的图片。提示框152可以包括文字信息:“移动物体消除”失败,请选择同一场景下的图片。
在一些实施例中,电子设备也可以接收用户操作,该用户操作用于选择一张图像和触发消除移动物体的功能。响应于该用户操作,电子设备可以将用户选择的一张图像识别为第一图像,然后获取包括第一图像的第一分组,并基于该第一分组进行移动物体的消除。也就是说,电子设备可以基于用户手动选择的第一图像进行移动物体的消除,具体示例如图16所示。
请参见图16,图16示例性示出了又一种人机交互示意图。其中,图16的(A)所示的用户界面160为用户点击控件162C之前的用户界面,图16的(B)所示的用户界面160为用户点击控件162C之后的用户界面。
如图16的(A)所示,用户界面160可以包括图片161和图片功能选项162。其中,电子设备可以检测到作用于图片161的缩略图的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图16的(A)所示的用户界面160。其中,图片161的缩略图可以显示在图3所示的控件305中。不限于此,图片161的缩略图也可以显示在任意一个图片列表中,例如图15的(B)所示的图片列表151中。
图片功能选项162可以包括一个或多个针对图片161的功能选项,例如可以包括分享功能选项162A、删除功能选项162B、移动物体消除功能选项162C、更多功能选项162D。
电子设备可以检测作用于移动物体消除功能选项162C的触控操作(例如点击操作),响应于该触控操作,电子设备可以将图片161识别为第一图像。然后,电子设备可以获取和图片161的相似程度大于或等于第一阈值的多张图片,图片161和获取的多张图片被识别为一个第一分组,相似程度的计算方式可参见上述分组过程的描述,不再赘述。电子设备可以基于该第一分组进行移动物体的消除,以得到消除移动物体后的目标图像,具体过程可参见上图7所示实施例,不再赘述。得到目标图像后,电子设备可以显示图16的(B)所示的用户界面160。也就是说,用户可以通过点击移动物体消除功能选项162C来触发消除移动物体的功能。
相比图16的(A)所示的用户界面160,图16的(B)所示的用户界面160还包括提示框163,提示框163可以包括文字信息:“移动物体消除”得到的图片已存储在“所有图片” 中。通过提示框163中的文字信息可以知道:电子设备将目标图像存储在图库应用中,且目标图像属于所有图片分类122B。用户可以点击图12所示的用户界面120中的所有图片分类122B来查看目标图像。也就是说,用户可以手动选择第一图像,并触发消除移动物体的功能。
可以理解地,若电子设备获取不到和图片161的相似程度大于或等于第一阈值的图片,则电子设备确认图片161无法作为第一图像进行移动物体的消除。因此,电子设备可以提示用户重新选择图片,具体示例和图15所示实施例类似,不再赘述。
不限于图16所示的示例,在具体实现中,用户也可以在图14的(A)和图15的(A)所示的用户界面141选择一张图片,然后点击移动物体消除功能选项1413D。响应于该点击操作,电子设备可以将用户选择的一张图片识别为第一图像,并基于该第一图像进行移动物体的消除,本申请实施例对此不作限定。
在一些实施例中,电子设备也可以接收针对一张图像的用户操作,该用户操作用于选择上述图像中需保留的被拍摄主体,以及触发消除移动物体的功能。响应于该用户操作,电子设备可以获取包括上述图像的第一分组,并将上述图像识别为该第一分组的第一图像。然后,电子设备可以基于上述第一分组、第一图像以及用户选择的被拍摄主体进行移动物体的消除。也就是说,电子设备可以基于用户手动选择的被拍摄主体进行移动物体的消除,具体示例如图17所示。
请参见图17,图17示例性示出了又一种人机交互示意图。其中,图17的(A)所示的用户界面171为用户点击控件1711B之前的用户界面,图17的(B)所示的用户界面172为用户点击控件1711B之后的用户界面。
如图17的(A)所示,用户界面171可以包括图片161和消除功能选项1711。其中,电子设备可以检测到作用于图16的(A)所示的用户界面160中的移动物体消除功能选项162C的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图17的(A)所示的用户界面171。
消除功能选项1711可以包括智能消除功能选项1711A和手动消除功能选项1711B。电子设备可以检测作用于智能消除功能选项1711A的触控操作(例如点击操作),响应于该触控操作,电子设备可以将图片161识别为第一图像。然后,电子设备可以获取和图片161的相似程度大于或等于第一阈值的多张图片,图片161和获取的多张图片被识别为一个第一分组,相似程度的计算方式可参见上述分组过程的描述,不再赘述。然后,电子设备可以基于该第一分组进行移动物体的消除,以得到消除移动物体后的目标图像,具体过程可参见上图7所示实施例,不再赘述。得到目标图像后,电子设备可以显示图16的(B)所示的用户界面160。也就是说,用户可以通过点击智能消除功能选项1711A来触发消除移动物体的功能。
电子设备也可以检测作用于手动消除功能选项1711B的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图17的(B)所示的用户界面172。用户界面172可以包括图片161和功能选项1721。其中:
电子设备可以检测作用于图片161中任意一个对象的触控操作(例如点击操作),响应于该触控操作,电子设备可以将该对象确定为用户当前选定的被拍摄主体。图17的(B)所示的用户界面172中,用户已选定区域161A内的人物对象。
功能选项1721可以包括确定选项1721A和取消选项1721B。用户已选择对象时,电子设备可以检测作用于确定选项1721A的触控操作(例如点击操作),响应于该触控操作,电子设备可以获取和图片161的相似程度大于或等于第一阈值的多张图片,图片161和获取的多 张图片被识别为一个第一分组,相似程度的计算方式可参见上述分组过程的描述,不再赘述。然后,电子设备可以将图片161识别为该第一分组中的第一图像,用户选定的对象识别为该第一分组中的被拍摄主体,并基于该第一分组进行移动物体的消除。该消除过程具体可参见上图7所示实施例,不再赘述。最后电子设备可以得到消除移动物体后的目标图像,此时可以显示图16的(B)所示的用户界面160。也就是说,用户可以手动选择被拍摄主体,并通过确定选项1721A来触发消除移动物体的功能。
需要说明的是,若用户未选定对象,即使用户点击确定选项1721A,也不会触发消除移动物体的功能。
电子设备也可以检测作用于取消选项1721B的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图17的(A)所示的用户界面171或图16的(A)所示的用户界面160。
在一些实施例中,电子设备也可以接收针对一张图像的用户操作,该用户操作用于选择上述图像中需消除的移动物体,以及触发消除移动物体的功能。响应于该用户操作,电子设备可以获取包括上述图像的第一分组,并将上述图像识别为该第一分组的第一图像。然后,电子设备可以基于上述第一分组、第一图像以及用户选择的移动物体进行移动物体的消除。也就是说,电子设备可以对用户手动选择的移动物体进行消除,具体示例如图18所示。
请参见图18,图18示例性示出了智能手机等电子设备上的图库应用的一个用户界面180。其中,电子设备可以检测作用于图17的(A)所示的用户界面171中的手动消除功能选项1711B的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图18所示的用户界面180。
如图18所示,用户界面180可以包括图片161和功能选项181。电子设备可以检测作用于图片161中任意一个对象的触控操作(例如点击操作),响应于该触控操作,电子设备可以将该对象确定为用户当前选定的需消除的移动物体。图18所示的用户界面180中,用户已选定区域161B内的人物对象。
功能选项181可以包括确定选项181A和取消选项181B。用户已选定对象时,电子设备可以检测作用于确定选项181A的触控操作(例如点击操作)。响应于该触控操作,电子设备可以获取和图片161的相似程度大于或等于第一阈值的多张图片,图片161和获取的多张图片被识别为一个第一分组,相似程度的计算方式可参见上述分组过程的描述,不再赘述。然后,电子设备可以将图片161识别为该第一分组中的第一图像,用户选定的对象识别为该第一分组中需消除的移动物体,并基于该第一分组进行移动物体的消除。该消除过程具体可参见上图7所示实施例,不再赘述。最后电子设备得到消除移动物体后的目标图像,此时可以显示图16的(B)所示的用户界面160。也就是说,用户可以手动选择需消除的移动物体,并通过确定选项181A来触发消除移动物体的功能。
需要说明的是,若用户未选定对象,即使用户点击确定选项181A,也不会触发消除移动物体的功能。
电子设备也可以检测作用于取消选项181B的触控操作(例如点击操作),响应于该触控操作,电子设备可以显示图17的(A)所示的用户界面171或图16的(A)所示的用户界面160。
在一些实施例中,电子设备确定第一分组后,确定用户选定的对象为该第一分组中需消除的移动物体之前,可以先获取用户选定的对象在第一分组的任意两张图像之间的距离。当 该距离大于或等于第五预设阈值时,电子设备才会确定用户选定的对象为该第一分组中需消除的移动物体,并基于该第一分组进行移动物体的消除。当存在小于第五预设阈值的距离时,电子设备确定用户选定的对象无法作为第一对象进行移动物体的消除。因此,电子设备可以提示用户重新选择移动物体,具体示例和图15所示实施例类似,不再赘述。确定用户选定的对象是否为第一对象的过程具体可参见图7的S704的描述,不再赘述。
不限于上述示例的情况,在具体实现中,用户可以既选择被拍摄主体也选择移动物体。例如,用户选定被拍摄主体后,可以点击图17的(B)所示的用户界面172中的确定选项1721A。响应于该点击操作,电子设备可以显示图18所示的用户界面180。用户在用户界面180选定移动物体后,可以点击用户界面180中的确定选项181A。响应于该点击操作,电子设备可以基于用户选定的被拍摄主体和移动物体进行移动物体的消除,本申请实施例对此不作限定。
可以理解地,图12、图13A-图13B、图14-图18所示实施例中,获取第一分组的说明可参见上述分组过程的描述,确定被拍摄主体、确定移动物体、确定第一图像的说明可参见上图7所示流程,不再赘述。
基于上图1-图9、图10A-图10D、图11-图12、图13A-图13B、图14-图18所示的一些实施例,下面介绍本申请提供的图像处理方法。
请参见图19,图19是本申请实施例提供的一种图像处理方法。该方法可以应用于图1所示的电子设备。该方法也可以应用于图2所示的电子设备。该方法包括但不限于如下步骤:
S101:电子设备确定符合第一条件的多张图像。
具体地,第一条件可以包括:多张图像中任意两张图像的相似程度大于或等于第一阈值,这多张图像可以称为一个第一分组。在一些实施例中,第一条件还可以包括下述至少一种:接收第一操作、多张图像中任意一张图像的拍摄时间在第一范围内、多张图像中任意一张图像的拍摄地点在第二范围内,其中,第一操作用于选择这多张图像。通过第一操作确定多张图像的示例可参见图14-图15所示实施例,不再赘述。相似程度的计算方式,确定符合第一条件的多张图像(即第一分组)的说明可参见上述分组过程的描述,不再赘述。
其中,电子设备确定的多张图像可以是电子设备通过默认的拍摄模式得到的,从而可以在通用场景下实现本申请实施例,应用更加广泛。
S102:电子设备从多张图像中确定出满足第二条件的第一图像,第一图像包括第一对象。
具体地,第一对象为第一图像中待消除的移动物体。第二条件包括下述至少一种:第一图像中的被拍摄主体的清晰度大于或等于第二阈值、第一图像中除所述被拍摄主体外的其他对象的数量少于第三阈值。电子设备可以对第一分组中每张图像进行处理和判断,以得到第一分组中满足第二条件的第一图像,具体可参见图7的S703的说明,不再赘述。
在一些实施例中,第二条件还可以包括:接收用于选择第一图像的用户操作。通过该用户操作确定第一图像的示例可参见图16所示实施例,不再赘述。
在一些实施例中,S102之前,电子设备可以先对上述多张图像(即第一分组)中的每张图像进行语义分割,以识别出该图像包括的对象(例如人物、建筑、汽车等),具体可参见图7的S701、图8所示实施例。
在一些实施例中,S102之前,该方法还包括:电子设备从上述多张图像(即第一分组)中确定出满足第三条件的被拍摄主体。所述第三条件包括下述至少一种:接收第二操作,第一分组中任意一张图像内的被拍摄主体的清晰度大于或等于第四阈值,第一分组中任意一张图像的对焦点位于被拍摄主体所在区域,第一分组中任意一张图像内的被拍摄主体的面积大 于或等于第五阈值,被拍摄主体属于预设类别,其中,第二操作用于选择被拍摄主体。电子设备可以对第一分组中每个对象进行处理和判断,以得到第一分组中满足第三条件的被拍摄主体,具体可参见图7的S702的说明,不再赘述。通过第二操作确定被拍摄主体的示例可参见图17所示实施例,不再赘述。
在一些实施例中,确定第一图像后,电子设备可以确定第一分组中的第一对象。电子设备可以首先将第一分组中的图像配置在同一个坐标系下(即图7的S704中的坐标配准),然后基于该坐标系获取每个对象在第一分组的任意两张图像之间的距离。当该距离大于或等于第五预设阈值时,电子设备可以将该对象确定为第一对象,具体可参见图7的S704的说明,不再赘述。
S103:电子设备从多张图像中确定出第二图像,第二图像包括第二对象。
具体地,第二图像可以是多张图像中除第一图像外的至少一张图像,例如,第二图像是多张图像中和第一图像的相似程度最高的一张图像,或者,第二图像是多张图像中和第一图像的相似程度大于预设阈值的至少一张图像。第二对象可以是根据一张第二图像得到的,也可以是根据至少一张第二图像拼接得到的。
第二对象在第二图像中的位置和第一对象在第一图像中的位置相对应。也就是说,第一图像和第二图像在同一个第一坐标系下时,第二对象在第二图像中的位置和第一对象在第一图像中的位置相同。其中,第一坐标系为电子设备进行坐标配准后得到的坐标系,例如图7的S704所示的标准坐标系。电子设备确定第二对象,以及包括第二对象的第二图像的示例可参见图9、图10A-图10D所示实施例,不再赘述。
S104:电子设备使用第二对象覆盖或替换第一对象,以得到目标图像。
具体地,电子设备使用第二对象覆盖或替换第一对象的示例可参见图7的S705、图9、图10A-图10D、图11所示实施例。其中,得到的目标图像的示例可参见图11的(C)所示的图像1100。目标图像相比第一图像不仅消除了移动物体,并在被消除移动物体后的区域上显示有真实的图像内容,用户体验感更好。
可以理解地,图19所示流程可以是电子设备在后台执行的,用户无感。电子设备得到目标图像后,可以将目标图像推荐给用户,无需用户手动触发消除移动物体的功能。具体示例可参见图13A-图13B所示实施例。
在图19所示的方法中,电子设备可以确定得到同一拍摄场景下的第一分组,第一分组中的图像可以为电子设备通过默认拍摄模式得到的图像,电子设备可以基于第一分组进行移动物体(即第一对象)的消除。因此用户无需使用特定的拍摄模式来实现移动物体的消除,使用更加方便,应用场景更为广泛。并且,用于填充或覆盖移动物体的图像内容是根据真实的第二图像得到的,显示效果更好,用户体验感也更好。
并且,电子设备可以在用户无感的情况下实现移动物体的消除,并将得到的目标图像推荐给用户查看,无需用户手动触发消除功能,使用更加方便。用户也可以手动选择第一分组、第一图像、被拍摄主体或移动物体,灵活性较强。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。上述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行上述计算机程序指令时,全部或部分地产生按照本申请上述的流程或功能。上述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。上述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,上述计算机指令可以从一个网站 站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。上述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。上述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。
总之,以上上述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (13)

  1. 一种图像处理方法,其特征在于,应用于电子设备,所述方法包括:
    确定符合第一条件的多张图像,所述第一条件包括:所述多张图像中任意两张图像的相似程度大于或等于第一阈值,所述多张图片包括至少两张图片;
    从所述多张图像中确定出满足第二条件的第一图像,所述第一图像包括第一对象,所述第一对象为所述第一图像中待消除的对象;
    从所述多张图像中确定出第二图像,所述第二图像包括第二对象,所述第二对象在所述第二图像中的位置和所述第一对象在所述第一图像中的位置相对应;
    使用所述第二对象覆盖或替换所述第一对象,以得到目标图像。
  2. 如权利要求1所述的方法,其特征在于,所述第一条件还包括下述至少一种:所述多张图像中任意一张图像的拍摄时间在第一范围内、所述多张图像中任意一张图像的拍摄地点在第二范围内。
  3. 如权利要求1所述的方法,其特征在于,所述确定符合第一条件的多张图像之前,所述方法还包括:接收第一操作,所述第一操作用于选择所述多张图像。
  4. 如权利要求1所述的方法,其特征在于,所述第二条件包括下述至少一种:所述第一图像中的被拍摄主体的清晰度大于或等于第二阈值、所述第一图像中除所述被拍摄主体外的其他对象的数量少于第三阈值、接收第二操作,所述第二操作用于选择所述第一图像。
  5. 如权利要求1所述的方法,其特征在于,所述第二图像是所述多张图像中除所述第一图像外的任意一张图像,所述第二图像和所述第一图像的相似程度大于或等于第四阈值。
  6. 如权利要求4所述的方法,其特征在于,所述方法还包括:
    从所述多张图像中确定出满足第三条件的所述被拍摄主体;所述第三条件包括下述至少一种:所述多张图像中任意一张图像内的所述被拍摄主体的清晰度大于或等于第五阈值、所述多张图像中任意一张图像的对焦点位于所述被拍摄主体所在区域、所述多张图像中任意一张图像内的所述被拍摄主体的面积大于或等于第六阈值、所述被拍摄主体属于预设类别,接收第三操作,所述第三操作用于选择所述被拍摄主体。
  7. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    接收第四操作,所述第四操作用于选择所述第一对象。
  8. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    确定所述第一图像中第三对象的中心点、所述第一图像中第四对象的中心点、第三图像中第五对象的中心点、以及所述第三图像中第六对象的中心点;其中,所述第三图像为所述多张图像中除所述第一图像外的任意一张图像,所述第三对象和所述第五对象的属性相同,所述第四对象和所述第六对象的属性相同;
    将所述第三对象的中心点和所述第五对象的中心点放置在同一坐标系下,设置为同一个坐标原点,并基于所述坐标原点建立第一坐标系;
    基于所述第一坐标系,确定所述第四对象的中心点和所述第六对象的中心点的第一距离;
    当所述第一距离大于或等于第七阈值时,确定所述第四对象为所述第一对象。
  9. 如权利要求8所述的方法,其特征在于,所述第三对象和所述第五对象表征的物体在任一时间点的位置均相同。
  10. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    接收第五操作;
    响应于所述第五操作,显示第一界面,其中,所述第一界面显示有所述多张图像和所述目标图像。
  11. 一种电子设备,其特征在于,所述电子设备包括至少一个存储器、至少一个处理器,所述至少一个存储器与所述至少一个处理器耦合,所述至少一个存储器用于存储计算机程序,所述至少一个处理器用于调用所述计算机程序,所述计算机程序包括指令,当所述指令被所述至少一个处理器执行时,使得所述电子设备执行如权利要求1-10任一项所述的方法。
  12. 一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行权利要求1-10任一项所述的方法。
  13. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-10任一项所述的方法。
PCT/CN2021/135041 2020-12-15 2021-12-02 图像处理方法及电子设备 WO2022127609A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/267,260 US20240046504A1 (en) 2020-12-15 2021-12-02 Image processing method and electronic device
EP21905538.1A EP4246426A4 (en) 2020-12-15 2021-12-02 IMAGE PROCESSING METHOD AND ELECTRONIC DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011483124.1 2020-12-15
CN202011483124.1A CN114693506A (zh) 2020-12-15 2020-12-15 图像处理方法及电子设备

Publications (1)

Publication Number Publication Date
WO2022127609A1 true WO2022127609A1 (zh) 2022-06-23

Family

ID=82060029

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135041 WO2022127609A1 (zh) 2020-12-15 2021-12-02 图像处理方法及电子设备

Country Status (4)

Country Link
US (1) US20240046504A1 (zh)
EP (1) EP4246426A4 (zh)
CN (1) CN114693506A (zh)
WO (1) WO2022127609A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107343149A (zh) * 2017-07-31 2017-11-10 维沃移动通信有限公司 一种拍照方法和移动终端
CN107833197A (zh) * 2017-10-31 2018-03-23 广东欧珀移动通信有限公司 图像处理的方法、装置、计算机可读存储介质和电子设备
WO2018113657A1 (zh) * 2016-12-19 2018-06-28 纳恩博(北京)科技有限公司 图像处理方法和装置
CN108961158A (zh) * 2017-05-17 2018-12-07 中国移动通信有限公司研究院 一种图像合成方法及装置
US20200053278A1 (en) * 2018-08-08 2020-02-13 Sony Corporation Techniques for improving photograph quality for common problem situations

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101999140B1 (ko) * 2013-01-03 2019-07-11 삼성전자주식회사 카메라장치 및 카메라를 구비하는 휴대단말기의 이미지 촬영장치 및 방법
CN111556278B (zh) * 2020-05-21 2022-02-01 腾讯科技(深圳)有限公司 一种视频处理的方法、视频展示的方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018113657A1 (zh) * 2016-12-19 2018-06-28 纳恩博(北京)科技有限公司 图像处理方法和装置
CN108961158A (zh) * 2017-05-17 2018-12-07 中国移动通信有限公司研究院 一种图像合成方法及装置
CN107343149A (zh) * 2017-07-31 2017-11-10 维沃移动通信有限公司 一种拍照方法和移动终端
CN107833197A (zh) * 2017-10-31 2018-03-23 广东欧珀移动通信有限公司 图像处理的方法、装置、计算机可读存储介质和电子设备
US20200053278A1 (en) * 2018-08-08 2020-02-13 Sony Corporation Techniques for improving photograph quality for common problem situations

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4246426A4

Also Published As

Publication number Publication date
EP4246426A4 (en) 2024-06-12
US20240046504A1 (en) 2024-02-08
EP4246426A1 (en) 2023-09-20
CN114693506A (zh) 2022-07-01

Similar Documents

Publication Publication Date Title
JP7238115B2 (ja) 写真撮影シナリオおよび電子デバイスで画像を表示するための方法
US10244177B2 (en) Method for processing image to generate relevant data based on user inputs and electronic device supporting the same
WO2021017932A1 (zh) 一种图像显示方法与电子设备
JP7058760B2 (ja) 画像処理方法およびその、装置、端末並びにコンピュータプログラム
US11914850B2 (en) User profile picture generation method and electronic device
WO2021078001A1 (zh) 一种图像增强方法及装置
WO2021244455A1 (zh) 一种图像内容的去除方法及相关装置
US20220417416A1 (en) Photographing method in telephoto scenario and mobile terminal
CN112262563A (zh) 图像处理方法及电子设备
US20220343648A1 (en) Image selection method and electronic device
WO2021103919A1 (zh) 构图推荐方法和电子设备
WO2022156473A1 (zh) 一种播放视频的方法及电子设备
US20230056332A1 (en) Image Processing Method and Related Apparatus
WO2021180046A1 (zh) 图像留色方法及设备
WO2022012418A1 (zh) 拍照方法及电子设备
WO2024041394A1 (zh) 拍摄方法及相关装置
CN117078509B (zh) 模型训练方法、照片生成方法及相关设备
CN115115679A (zh) 一种图像配准方法及相关设备
CN114979457B (zh) 一种图像处理方法及相关装置
WO2022095906A1 (zh) 一种按键映射方法、电子设备及系统
WO2022127609A1 (zh) 图像处理方法及电子设备
WO2023280021A1 (zh) 一种生成主题壁纸的方法及电子设备
CN117499797B (zh) 图像处理方法及相关设备
WO2024046162A1 (zh) 一种图片推荐方法及电子设备
WO2022228010A1 (zh) 一种生成封面的方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21905538

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18267260

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2021905538

Country of ref document: EP

Effective date: 20230614

NENP Non-entry into the national phase

Ref country code: DE