Image processing method and device, computer readable medium and electronic device

By automatically detecting and eliminating the image processing method of the selfie stick area, the problem of selfie stick residue in images captured by existing selfie stick devices is solved, efficient selfie stick image elimination is achieved, and user experience and image quality are improved.

CN113744126BActive Publication Date: 2024-09-06GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110904064.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-06
Publication Date
2024-09-06
Estimated Expiration
2041-08-06

AI Technical Summary

Technical Problem

Images captured by existing selfie stick devices often include selfie stick images, and users need to use professional tools to manually retouch the images. The operation is complex and inefficient, and there is a lack of automated selfie stick image elimination solutions.

Method used

An image processing method is provided. By activating the selfie stick image elimination mode, the selfie stick area in the image to be processed is detected, and automatic elimination processing is performed to generate an output image that does not include the selfie stick.

Benefits of technology

It simplifies user operations, improves the efficiency of selfie stick image elimination, improves the display effect of output images, provides a flexible selfie stick image elimination solution, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113744126B
    Figure CN113744126B
Patent Text Reader

Abstract

The present disclosure provides an image processing method and device, a computer-readable medium and an electronic device, and relates to the field of image processing technology. The method comprises: in response to starting a selfie stick image elimination mode, obtaining an input image to be processed; detecting the image to be processed, determining a selfie stick image area; eliminating the image content in the selfie stick image area to obtain an output image. The present disclosure can realize the automatic hiding function of the selfie stick image in the image, eliminate the selfie stick image in the image, and do not need to eliminate it manually, thereby simplifying user operations and improving the display effect of the output image.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the popularization of photography equipment, people's demand for selfies is increasing. Selfie sticks are popular all over the world as selfie tools. The device can be extended or retracted within a certain length range. Users only need to fix their mobile phones or cameras on the telescopic rod and use wired or wireless remote controls to take selfies at multiple angles.

[0003] At present, images taken with a selfie stick device generally have part of the selfie stick image in the output image. Users generally need to use professional tools to retouch the image to remove the selfie stick image from the image. This is not only complicated but also inefficient, and it is impossible to automatically remove the selfie stick image. Summary of the invention

[0004] The purpose of the present disclosure is to provide an image processing method, an image processing device, a computer-readable medium and an electronic device, thereby overcoming the problem of complex operation and low efficiency in eliminating the selfie stick image in the image in the related art at least to a certain extent.

[0005] According to a first aspect of the present disclosure, there is provided an image processing method, comprising:

[0006] In response to starting the selfie stick image erasing mode, an input image to be processed is obtained;

[0007] Detecting the image to be processed to determine the selfie stick image area;

[0008] The image content in the selfie stick image area is eliminated to obtain an output image.

[0009] According to a second aspect of the present disclosure, there is provided an image processing apparatus, comprising:

[0010] An image acquisition module, used for responding to starting the selfie stick image erasing mode and acquiring an input image to be processed;

[0011] A selfie stick image area detection module, used to detect the image to be processed and determine the selfie stick image area;

[0012] The selfie stick image elimination module is used to eliminate the image content in the selfie stick image area to obtain an output image.

[0013] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.

[0014] According to a fourth aspect of the present disclosure, there is provided an electronic device, characterized in that it includes:

[0015] Processor; and

[0016] The memory is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the above method.

[0017] An image processing method provided by an embodiment of the present disclosure responds to starting a selfie stick image elimination mode, obtains an input image to be processed, detects the image to be processed, determines the selfie stick image area, and eliminates the image content in the selfie stick image area to obtain an output image. On the one hand, by setting the selfie stick image elimination mode, users can flexibly set it, thereby improving the flexibility of selfie stick image elimination; on the other hand, in the selfie stick image elimination mode, whether it is a preview image of the shooting process or an image that has been shot, the selfie stick area is automatically eliminated, and the user does not need to manually remove it, thereby simplifying user operations, improving elimination efficiency, improving the display effect of the output image, and improving user experience.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0020] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;

[0021] Figure 2 A schematic diagram showing an electronic device to which the embodiments of the present disclosure can be applied;

[0022] Figure 3 A schematic diagram schematically illustrates a flow chart of an image processing method in an exemplary embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of a process for determining a selfie stick image area in an image to be processed in an exemplary embodiment of the present disclosure is schematically shown;

[0024] Figure 5 A schematic diagram of a process of filling a selfie stick image area in an exemplary embodiment of the present disclosure is schematically shown;

[0025] Figure 6A schematic diagram schematically illustrates a method of hiding a selfie stick image in an exemplary embodiment of the present disclosure;

[0026] Figure 7 A schematic diagram of a process of cropping a selfie stick image area in an exemplary embodiment of the present disclosure is schematically shown;

[0027] Figure 8 A schematic diagram schematically shows another process of hiding a selfie stick image in an exemplary embodiment of the present disclosure;

[0028] Fig. 9 A schematic diagram of a process of starting a selfie stick image erasing mode in an exemplary embodiment of the present disclosure is schematically shown;

[0029] Fig.10 The following is a schematic diagram schematically showing the composition of an image processing device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0031] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0032] Figure 1 A schematic diagram showing a system architecture of an exemplary application environment in which an image processing method and apparatus according to an embodiment of the present disclosure can be applied.

[0033] like Figure 1As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with image processing functions, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0034] The image processing method provided in the embodiment of the present disclosure is generally executed by the terminal devices 101, 102, and 103, and accordingly, the image processing apparatus is generally disposed in the terminal devices 101, 102, and 103. However, it is easy for those skilled in the art to understand that the image processing method provided in the embodiment of the present disclosure may also be executed by the server 105, and accordingly, the image processing apparatus may also be disposed in the server 105, which is not particularly limited in the present exemplary embodiment.

[0035] An exemplary embodiment of the present disclosure provides an electronic device for implementing an image processing method, which may be Figure 1 The terminal device 101, 102, 103 or the server 105 in the embodiment of the present invention comprises at least a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the image processing method by executing the executable instructions.

[0036] Below Figure 2 Taking the mobile terminal 200 in FIG. 1 as an example, the structure of the electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The structure in the figure can also be applied to fixed type devices. In other embodiments, the mobile terminal 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the components is only shown schematically and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also adopt the same Figure 2 Different interface connection methods, or a combination of multiple interface connection methods.

[0037] like Figure 2As shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a subscriber identification module (SIM) card interface 295, etc. The sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, etc.

[0038] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0039] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the mobile terminal 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0040] The processor 210 is provided with a memory. The memory can store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and the execution is controlled by the processor 210.

[0041] The charging management module 240 is used to receive charging input from the charger. The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, the internal memory 221, the display screen 290, the camera module 291 and the wireless communication module 260.

[0042] The wireless communication function of the mobile terminal 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modulation and demodulation processor and baseband processor. Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals; mobile communication module 250 can provide solutions for wireless communication including 2G / 3G / 4G / 5G applied on mobile terminal 200; modulation and demodulation processor can include modulator and demodulator; wireless communication module 260 can provide solutions for wireless communication including wireless local area network (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT) and the like applied on mobile terminal 200. In some embodiments, antenna 1 of mobile terminal 200 is coupled with mobile communication module 250, and antenna 2 is coupled with wireless communication module 260, so that mobile terminal 200 can communicate with network and other devices through wireless communication technology.

[0043] The mobile terminal 200 implements the display function through a GPU, a display screen 290, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 290 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or change display information.

[0044] The mobile terminal 200 can realize the shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera module 291; the camera module 291 is used to capture static images or videos; the digital signal processor is used to process digital signals, and can process other digital signals in addition to digital image signals; the video codec is used to compress or decompress digital videos, and the mobile terminal 200 can also support one or more video codecs.

[0045] The external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile terminal 200. The external memory card communicates with the processor 210 through the external memory interface 222 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0046] The internal memory 221 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile terminal 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), etc. The processor 210 executes various functional applications and data processing of the mobile terminal 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.

[0047] The mobile terminal 200 can implement audio functions such as music playing and recording through the audio module 270 , the speaker 271 , the receiver 272 , the microphone 273 , the earphone interface 274 and the application processor.

[0048] The depth sensor 2801 is used to obtain the depth information of the scene. In some embodiments, the depth sensor can be arranged in the camera module 291.

[0049] The pressure sensor 2802 is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 2802 can be arranged on the display screen 290. There are many types of pressure sensors 2802, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.

[0050] The gyro sensor 2803 can be used to determine the motion posture of the mobile terminal 200. In some embodiments, the angular velocity of the mobile terminal 200 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 2803. The gyro sensor 2803 can be used for shooting anti-shake, navigation, somatosensory game scenes, etc.

[0051] In addition, sensors with other functions may be set in the sensor module 280 according to actual needs, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0052] The mobile terminal 200 may also include other devices that provide auxiliary functions. For example, the key 294 includes a power key, a volume key, etc., and the user can generate key signal input related to the user settings and function control of the mobile terminal 200 through key input. For example, the indicator 292, the motor 293, the SIM card interface 295, etc.

[0053] One solution to eliminate the selfie stick image can be achieved through a panoramic camera, specifically by placing the selfie stick in the blind spot of the panoramic camera, so that the image captured by the lens does not contain the selfie stick image. However, this technical solution requires a panoramic large field of view (FOV) camera, which is a customized camera with a high cost and is not suitable for use in current terminal devices such as smartphones.

[0054] Another solution to remove the selfie stick image is to calculate the location of the selfie stick through 3D modeling based on the difference in depth data provided by the structured light source, and then shield the selfie stick area. However, this technical solution requires an additional structured light source, which results in additional costs. At the same time, the calculation of the location of the selfie stick through 3D modeling based on the depth data is relatively large.

[0055] Based on one or more problems in the related art, this exemplary embodiment first provides an image processing method. The image processing method of the exemplary embodiment of the present disclosure is specifically described below by taking execution by a terminal device as an example.

[0056] Figure 3 A schematic flow chart of an image processing method in this exemplary embodiment is shown, which may include the following steps S310 to S330:

[0057] In step S310, in response to starting the selfie stick image erasing mode, an input image to be processed is obtained.

[0058] In an exemplary embodiment, the image to be processed refers to an input image of a selfie stick image to be eliminated. For example, the image to be processed may be an image stored in a terminal device, and the input image to be processed may be obtained through a user's selection operation; the image to be processed may also be an image to be processed acquired in real time by an image acquisition module of the terminal device, and the input image to be processed may be directly acquired from the image acquisition module, wherein the image acquisition module may be a module integrated in the terminal device, or an external image acquisition module communicatively connected to the terminal device, and this exemplary embodiment does not impose any special limitation on the type of the image acquisition module; in addition, the image to be processed may also be an input image of other types of selfie stick images to be eliminated, and this exemplary embodiment does not impose any special limitation on this.

[0059] When it is detected that the selfie stick image erasing mode is started, any input image can be used as an image to be processed, and the selfie stick image area contained therein is detected and the selfie stick image in the selfie stick image area is erased.

[0060] The selfie stick image erasure mode can be started in a variety of ways. For example, a start entry for the selfie stick image erasure mode can be pre-set, such as providing a start entry after selecting an image in an album application, or providing a start entry when entering a photo application, etc. The selfie stick image erasure mode can be started by a user's trigger operation; the selfie stick image erasure mode can also be automatically started by detecting whether a selfie stick device is connected. Of course, there can be other ways to start the selfie stick image erasure mode, and this example embodiment does not make any special limitation to this.

[0061] By setting the start and stop of the selfie stick image elimination mode, the user can automatically process the selfie stick image in the input image to be processed after turning on the selfie stick image elimination mode, simplifying the operation that the user needs to manually process multiple images separately, and improving processing efficiency; at the same time, when the user chooses to turn off the selfie stick image elimination mode, it can avoid selfie stick image elimination processing for images that do not need to be processed, avoiding misoperation and reducing the computing power of the terminal device.

[0062] In step S320, the image to be processed is detected to determine the selfie stick image area.

[0063] In an exemplary embodiment, the selfie stick image area refers to an area in the image to be processed that contains image content corresponding to the selfie stick. The coordinate position of the selfie stick image area can be determined by detecting the image to be processed. For example, the selfie stick image area in the image to be processed can be detected by a pre-trained deep neural network model, or the selfie stick image area can be determined by matching feature points extracted from the image to be processed with feature points of a pre-stored sample selfie stick image. Of course, other detection methods that can extract the selfie stick image area from the image to be processed are also possible, and this exemplary embodiment does not specifically limit this.

[0064] In step S330, the image content in the selfie stick image area is eliminated to obtain an output image.

[0065] In an exemplary embodiment, elimination processing refers to the process of hiding the image content in the selfie stick image area. For example, the selfie stick image area can be filled with the neighboring pixel information of the selfie stick image area to replace the pixel information corresponding to the selfie stick content in the selfie stick image area, thereby achieving elimination processing of the image content in the selfie stick image area; it is also possible to generate an image that does not contain the selfie stick image by generating a discriminant adversarial neural network to achieve elimination processing of the image content in the selfie stick image area; of course, it is also possible to achieve elimination processing of the image content in the selfie stick image area by cropping the selfie stick image area in the image to be processed, and this exemplary embodiment does not specifically limit this.

[0066] Steps S310 to S330 are described in detail below.

[0067] In an exemplary embodiment, step S320 may include steps S410 and S420, to detect the image to be processed, determine the selfie stick image area, and refer to Figure 4 As shown, it may specifically include:

[0068] Step S410, inputting the image to be processed into a selfie stick image recognition model to obtain position coordinates corresponding to the selfie stick image area;

[0069] Step S420: determining the selfie stick image area in the image to be processed according to the position coordinates.

[0070] Among them, the selfie stick image recognition model refers to an artificial intelligence model used to detect the region of interest (ROI) in the image to be processed. For example, the selfie stick image recognition model can be a deep learning model such as a convolutional neural network model (CNN), or a machine learning model such as a support vector machine (SVM). This example embodiment does not impose any special limitation on the type of artificial intelligence model used to detect the region of interest in the image to be processed.

[0071] The position coordinates refer to the image coordinates of the selfie stick image area in the image to be processed, and the image area corresponding to the selfie stick image, that is, the selfie stick image area, can be located and determined in the image to be processed according to the output position coordinates.

[0072] Specifically, step S330 may include step S510 and step S520 to achieve the elimination of the selfie stick image in the image to be processed, referring to Figure 5 As shown, it may specifically include:

[0073] Step S510, searching for an image area adjacent to the selfie stick image area based on the position coordinates;

[0074] Step S520, obtaining pixel information of the adjacent image area, and filling the selfie stick image area according to the pixel information to eliminate the selfie stick image in the image to be processed, so as to obtain an output image.

[0075] Among them, the adjacent image area refers to the image area around the selfie stick image area within a threshold range. Specifically, the image search algorithm can be used to use the position coordinates of the selfie stick image area as a search seed, and search on the image to be processed according to a preset search threshold range to obtain the adjacent image area corresponding to the selfie stick image area.

[0076] Generally speaking, filling an image region with the color information of an adjacent image region can make the color of the filled image region match the color of the adjacent image region, thereby avoiding a large difference in the display effect of the image.

[0077] Therefore, the pixel information of the adjacent image area can be obtained, wherein the pixel information can be the RGB value corresponding to each pixel in the adjacent image area. Of course, if the image to be processed belongs to an image in a non-RGB color space, the pixel information can be the pixel information of each pixel in the corresponding color space. If the image to be processed belongs to a Lab color space, the pixel information can be the Lab value corresponding to each pixel in the adjacent image area. This example embodiment does not make any special limitation to this.

[0078] Furthermore, the selfie stick image area can be filled according to the pixel information of each pixel in the adjacent image area to obtain an output image. In order to avoid the problem that the pixel information filled in the selfie stick image area is greatly different from the pixel information of each pixel in the adjacent image area, resulting in poor display effect of the output image, the average value of the pixel information of each pixel in the adjacent image area can be used as the pixel information filled in the selfie stick image area. Of course, the median value of the pixel information of each pixel in the adjacent image area can also be used as the pixel information filled in the selfie stick image area, and this exemplary embodiment is not limited to this.

[0079] Furthermore, since the pixel information in the filled selfie stick image area and the pixel information in the adjacent image area cannot be perfectly transitioned, a relatively obvious boundary may be generated, thereby affecting the display effect of the output image. Therefore, a smoothing filter process can be performed on the image to be processed after the filling process to blur the boundary that may be generated between the filled selfie stick image area and the adjacent image area, thereby obtaining the output image and improving the display effect of the output image.

[0080] Among them, the image to be processed after the filling processing can be smoothed by a Gaussian filter. The Gaussian filter is an average value with weights, that is, a weighted average. The weight of the center is larger than the weight of the adjacent pixels, so that the boundary effect can be overcome; of course, the image to be processed after the filling processing can also be smoothed by a statistically based filter such as a median filter or a smoothing filter. This example embodiment does not make any special limitations on this.

[0081] Figure 6 A schematic diagram of hiding a selfie stick image in an exemplary embodiment of the present disclosure is schematically shown.

[0082] refer to Figure 6 As shown, step S610, obtaining an input image to be processed 601, and inputting the image to be processed 601 into the selfie stick image recognition model, obtaining the position coordinates of the selfie stick image, and determining the selfie stick image area 602 according to the position coordinates;

[0083] Step S620, determining the adjacent image area based on the position coordinates of the selfie stick image area 602 and a preset search threshold range, and filling the selfie stick image area 602 according to the pixel information of the adjacent image area to eliminate the selfie stick image in the selfie stick image area 602, and obtaining an output image 603 that does not contain the selfie stick image content.

[0084] In an exemplary embodiment, the Figure 7 The steps in the embodiment are used to detect the selfie stick image area and eliminate the image content in the selfie stick image area. Figure 7 As shown, it may specifically include:

[0085] Step S710, dividing the image to be processed into regions to obtain multiple image regions;

[0086] Step S720, in response to the input selection operation, determining at least one target image area, and using the target image area as the selfie stick image area;

[0087] Step S730: cropping the image to be processed based on the position coordinates of the selfie stick image area to eliminate the selfie stick image in the image to be processed, and obtaining an output image.

[0088] Among them, region division refers to the process of dividing the image to be processed into multiple image regions. For example, the image to be processed can be divided into regions according to a set division matrix. For example, the division matrix can be 10*10, and the image to be processed can be divided into a 10*10 image region matrix according to the length and width of the image to be processed. Of course, the image to be processed can also be divided into regions in other ways, such as determining multiple regions of interest or selfie stick image regions in the image to be processed according to the user's drawing operation. This example embodiment does not make any special limitations on this.

[0089] The selection operation refers to an operation for selecting a target image area from multiple divided image areas. For example, it can be a click operation to select an image area, or it can be an operation of selecting an image area by controlling a selection box through a key. Of course, it can also be a gaze operation to select an image area through an eye attention point collector. This example embodiment does not specifically limit this.

[0090] For example, assuming that the image to be processed is divided into 100 image areas of 10*10 according to the division matrix, if the position coordinates of the selected target image area are (0, 0), (0, 1), (1, 1), (1, 0), then all image areas in the image to be processed that are in the same row as the target image area (that is, the vertical coordinate is 1) can be cropped to eliminate the selfie stick image in the image to be processed. Of course, all image areas in the image to be processed that are in the same column as the target image area (that is, the horizontal coordinate is 1) can also be cropped to eliminate the selfie stick image in the image to be processed. This example embodiment does not specifically limit this.

[0091] By manually setting the cropping area, the determined area in the stored image or the preview image is cropped to eliminate or shield the selfie stick image. The final output image does not contain the selfie stick image, the selfie stick image is eliminated, and the display effect of the output image is improved.

[0092] Figure 8A schematic diagram schematically shows another process of hiding a selfie stick image in an exemplary embodiment of the present disclosure.

[0093] refer to Figure 8 As shown, step S810, obtain the input image to be processed 801, and divide the image to be processed 801 into 4*4 image regions according to the set division matrix such as 4*4, and display it to the user, and determine the target image region 802 according to the selection operation input by the user;

[0094] Step S820, cropping the processed image 801 according to the horizontal coordinates of the position coordinates of the target image area 802 to obtain an output image 803 with the selfie stick image eliminated; or cropping the processed image 801 according to the vertical coordinates of the position coordinates of the target image area 802 to obtain an output image 804 with the selfie stick image eliminated. Specifically, the output image 803 can be cropped with the horizontal coordinate or the vertical coordinate according to the actual situation. Of course, the output image 803 can also be cropped with the horizontal coordinate and the vertical coordinate of the position coordinate of the target image area 802, but the present example embodiment is not limited to this.

[0095] In an exemplary embodiment, the selfie stick image erasure mode may be started in response to a received first trigger operation; or the selfie stick image erasure mode may be turned off in response to a received second trigger operation.

[0096] Among them, the first trigger operation can be a click operation on the start control of the selfie stick image erasure mode, or a shaking operation on the terminal device, and can also be other trigger operations that start the selfie stick image erasure mode according to actual conditions. This example embodiment does not specifically limit this. The second trigger operation is relative to the first trigger operation. For example, the first trigger operation is a click operation on the start control, and the second trigger operation can be a click operation on the start control again. It should be noted that the "first" and "second" in this example embodiment are only used to distinguish between the operations of starting and closing the selfie stick image erasure mode, and there is no special limitation in any special sense, and should not cause any special limitation to this example embodiment.

[0097] In an exemplary embodiment, it is also possible to Fig. 9 To start the selfie stick image removal mode, refer to Fig. 9 As shown, it may specifically include:

[0098] Step S910, when detecting that a connected device is connected, determining whether the connected device is a selfie stick device;

[0099] Step S920: If it is detected that the connected device is a selfie stick device, the selfie stick image elimination mode is started.

[0100] Among them, the connecting device refers to a device that establishes a communication connection with the terminal device through a wired connection or a wireless connection. For example, the connecting device can be a headset or a selfie stick. Of course, it can also be other external devices. This example embodiment does not specifically limit this.

[0101] At present, selfie stick devices generally achieve communication connection with terminal devices through wired connection and wireless connection. When the connection method is wireless connection such as Bluetooth connection, the device identification of the connected device can be obtained through the wireless Bluetooth protocol. When it is determined that the device identification of the connected device belongs to the selfie stick device, the connected device can be considered to be a selfie stick device; when the connection method is wired connection, since the connection cable of the selfie stick device and the connection cable of the headset are both four-section headphone interface connection cables, it is impossible to accurately distinguish whether the connected device is a selfie stick or a headset. Therefore, when it is detected that the connected device is connected, binary data information can be sent to the connected device, and the receiving connected device determines whether the connected device is a selfie stick based on the feedback information returned by the data information. If the microphone MIC pin in the headphone interface receives the returned feedback information, it is determined that the connected device is a selfie stick.

[0102] By determining whether the type of the connected device is a selfie stick and controlling the triggering of the selfie stick image erasure mode, the user operation is further simplified and the processing efficiency is improved.

[0103] In summary, in this exemplary embodiment, in response to starting the selfie stick image elimination mode, an input image to be processed is obtained; the image to be processed is detected to determine the selfie stick image area; the image content in the selfie stick image area is eliminated to obtain an output image. On the one hand, by setting the selfie stick image elimination mode, the user can flexibly set it, thereby improving the flexibility of selfie stick image elimination; on the other hand, in the selfie stick image elimination mode, whether it is a preview image of the shooting process or an image that has been shot, the selfie stick area is automatically eliminated, and the user does not need to manually remove it, which simplifies the user operation, improves the elimination efficiency, improves the display effect of the output image, and improves the user experience.

[0104] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0105] For further reference, Fig.10 As shown, in the embodiment of this example, an image processing device 1000 is also provided, which may include an image acquisition module 1010, a selfie stick image area detection module 1020 and a selfie stick image elimination module 1030. Among them:

[0106] The image acquisition module 1010 is used for acquiring an input image to be processed in response to starting the selfie stick image erasing mode;

[0107] The selfie stick image area detection module 1020 is used to detect the image to be processed and determine the selfie stick image area;

[0108] The selfie stick image elimination module 1030 is used to eliminate the image content in the selfie stick image area to obtain an output image.

[0109] In an exemplary embodiment, the selfie stick image area detection module 1020 may be used to:

[0110] Inputting the image to be processed into a selfie stick image recognition model to obtain position coordinates corresponding to the selfie stick image area;

[0111] A selfie stick image region in the image to be processed is determined according to the position coordinates.

[0112] In an exemplary embodiment, the selfie stick image removal module 1030 may be used to:

[0113] Searching for an image area adjacent to the selfie stick image area based on the position coordinates;

[0114] Pixel information of the adjacent image area is obtained, and the selfie stick image area is filled according to the pixel information to eliminate the selfie stick image in the image to be processed, so as to obtain an output image.

[0115] In an exemplary embodiment, the image processing device 1000 may further include a selfie stick image cropping module, which may be used to:

[0116] Dividing the image to be processed into regions to obtain multiple image regions;

[0117] In response to the input selection operation, determining at least one target image area, and using the target image area as the selfie stick image area;

[0118] Based on the position coordinates of the selfie stick image area, the image to be processed is cropped to eliminate the selfie stick image in the image to be processed, so as to obtain an output image.

[0119] In an exemplary embodiment, the image processing apparatus 1000 may further include an image smoothing module, which may be used to:

[0120] The image to be processed after the filling process is subjected to smoothing filtering to obtain an output image.

[0121] In an exemplary embodiment, the image acquisition module 1010 may be used to:

[0122] In response to the received first trigger operation, starting the selfie stick image erasing mode; or

[0123] In response to the received second trigger operation, the selfie stick image erasing mode is turned off.

[0124] In an exemplary embodiment, the image acquisition module 1010 may be used to:

[0125] When detecting that a connected device is connected, determining whether the connected device is a selfie stick device;

[0126] If it is detected that the connected device is a selfie stick device, the selfie stick image elimination mode is activated.

[0127] The specific details of each module in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.

[0128] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0129] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification, for example, it can execute Figures 3 to 9 Any one or more steps in .

[0130] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0131] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0132] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0133] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0134] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An image processing method, the method being applied to a terminal device, characterized in that: The terminal device has an image processing function, including: In response to starting the selfie stick image erasing mode, an input image to be processed is obtained; Detecting the image to be processed to determine the selfie stick image area; Eliminating the image content in the selfie stick image area to obtain an output image; The response to start the selfie stick image elimination mode includes: When detecting that a connected device is connected, determining whether the connected device is a selfie stick device; If it is detected that the connected device is a selfie stick device, the selfie stick image elimination mode is activated; And, turning off the selfie stick image erasure mode when the user chooses to turn off the selfie stick image erasure mode; The detecting the image to be processed to determine the selfie stick image area includes: Inputting the image to be processed into a selfie stick image recognition model to obtain position coordinates corresponding to the selfie stick image area; A selfie stick image region in the image to be processed is determined according to the position coordinates.

2. The method according to claim 1, characterized in that: The step of performing a process of eliminating the image content in the selfie stick image area to obtain an output image comprises: Searching for an image area adjacent to the selfie stick image area based on the position coordinates; Pixel information of the adjacent image area is obtained, and the selfie stick image area is filled according to the pixel information to eliminate the selfie stick image in the image to be processed, so as to obtain an output image.

3. The method according to claim 1, characterized in that The method further comprises: Dividing the image to be processed into regions to obtain multiple image regions; In response to the input selection operation, determining at least one target image area, and using the target image area as the selfie stick image area; Based on the position coordinates of the selfie stick image area, the image to be processed is cropped to eliminate the selfie stick image in the image to be processed, so as to obtain an output image.

4. The method according to claim 2, characterized in that: The method further comprises: The image to be processed after the filling process is subjected to smoothing filtering to obtain an output image.

5. The method according to claim 1, characterized in that: The response starts the selfie stick image elimination mode, including: In response to the received first trigger operation, starting the selfie stick image erasing mode; or In response to the received second trigger operation, the selfie stick image erasure mode is turned off.

6. An image processing device, the device being arranged in a terminal device, characterized in that: The terminal device has an image processing function, including: An image acquisition module, used for responding to starting the selfie stick image erasing mode and acquiring an input image to be processed; A selfie stick image area detection module, used to detect the image to be processed and determine the selfie stick image area; A selfie stick image elimination module, used to eliminate the image content in the selfie stick image area to obtain an output image; Wherein, the image acquisition module is used to determine whether the connected device is a selfie stick device when detecting that the connected device is connected; if it is detected that the connected device is a selfie stick device, the selfie stick image elimination mode is started; And, turning off the selfie stick image erasure mode when the user chooses to turn off the selfie stick image erasure mode; The selfie stick image area detection module is specifically used to input the image to be processed into the selfie stick image recognition model to obtain the position coordinates corresponding to the selfie stick image area; and determine the selfie stick image area in the image to be processed according to the position coordinates.

7. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 5 by executing the executable instructions.