CN109636731B - Image smear elimination method, electronic device and storage medium - Google Patents

Image smear elimination method, electronic device and storage medium Download PDF

Info

Publication number
CN109636731B
CN109636731B CN201811239846.5A CN201811239846A CN109636731B CN 109636731 B CN109636731 B CN 109636731B CN 201811239846 A CN201811239846 A CN 201811239846A CN 109636731 B CN109636731 B CN 109636731B
Authority
CN
China
Prior art keywords
image
smear
pixel value
target
region
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811239846.5A
Other languages
Chinese (zh)
Other versions
CN109636731A (en
Inventor
黄树伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Foshan Huayue Intellectual Property Operation Co ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201811239846.5A priority Critical patent/CN109636731B/en
Publication of CN109636731A publication Critical patent/CN109636731A/en
Application granted granted Critical
Publication of CN109636731B publication Critical patent/CN109636731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/73
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Abstract

The application discloses a method for eliminating image smear, electronic equipment and a storage medium, wherein the method comprises the steps of acquiring a smear region in a first image and a target region corresponding to the smear region; moving the smear image in the smear area to a target area, wherein the target area is provided with a target image; and superposing the smear image and the target image, and processing the superposed image to eliminate the smear image in the first image to obtain a second image. By means of the method, the image processing device and the image processing method, the smear in the image can be eliminated, and the image quality is improved.

Description

Image smear elimination method, electronic device and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method for eliminating image smear, an electronic device, and a storage medium.
Background
In the existing digital photography or video shooting, images are collected by a CMOS (Complementary Metal Oxide Semiconductor) or CCD (Charge Coupled Device) sensor, and then are presented on a screen after appropriate data processing; however, when photographing is performed by using a photographing and image capturing apparatus, a problem of smear due to movement of an object may occur to affect a photographing effect, and thus it is necessary to eliminate the smear generated in an image.
Disclosure of Invention
The present application mainly solves the problem of providing an image smear removal method, an electronic device, and a storage medium, which can remove a smear in an image and improve image quality.
In order to solve the above technical problem, a technical solution adopted by the present application is to provide a method for eliminating image smear, including: acquiring a smear region and a target region corresponding to the smear region in a first image; moving the smear image in the smear area to a target area, wherein the target area is provided with a target image; and superposing the smear image and the target image, and processing the superposed image to eliminate the smear image in the first image to obtain a second image.
In order to solve the above technical problem, another technical solution adopted by the present application is to provide an electronic device, including: a memory and a processor connected to each other, the memory being used for storing a computer program, the computer program, when being executed by the processor, being used for implementing the above-mentioned method for eliminating image smear.
In order to solve the above technical problem, another technical solution adopted by the present application is to provide a storage medium for storing a computer program, wherein the computer program is used for implementing the above image smear removal method when being executed by a processor.
Through the scheme, the beneficial effects of the application are that: firstly, acquiring a smear region and a target region corresponding to the smear region in a first image; then moving the smear image in the smear area to a target area where the target image is located; and then, the smear image and the target image are superposed, and the superposed image is processed to eliminate the smear image in the first image to obtain a second image without smear, so that the smear in the image can be eliminated, and the image quality is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
FIG. 1 is a flowchart illustrating an embodiment of a method for eliminating image smear provided in the present application;
FIG. 2 is a schematic diagram of a first image in an embodiment of a method for removing smear in an image provided by the present application;
FIG. 3 is a schematic diagram illustrating an image after moving a smear image according to an embodiment of the method for removing an image smear provided by the present application;
FIG. 4 is a schematic flowchart of another embodiment of a method for eliminating image smear provided in the present application;
FIG. 5 is a schematic flow chart diagram illustrating a method for eliminating image smear according to another embodiment of the present disclosure;
FIG. 6 is a schematic diagram of pixel values of a smear image and a third image in a further embodiment of the method for removing image smear provided by the present application;
FIG. 7 is a diagram of a background region and a smear region in another embodiment of the image smear removal method provided in the present application;
FIG. 8 is a schematic diagram of a distance and an azimuth angle between a smear image and a target area in a further embodiment of the image smear removal method provided by the present application;
FIG. 9 is a schematic structural diagram of an embodiment of an electronic device provided in the present application;
fig. 10 is a schematic structural diagram of an embodiment of a storage medium provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic flowchart of an embodiment of a method for eliminating image smear provided in the present application, where the method includes:
step 11: a smear region and a target region corresponding to the smear region in the first image are acquired.
When the first image has the smear image, in order to eliminate the smear image so as to prevent the smear image from interfering with the first image, a smear region in the first image and a target region corresponding to the smear region may be obtained first, the smear region having the smear image, and the smear image covering a portion of the non-target image.
Step 12: and moving the smear image positioned in the smear area to a target area, wherein the target area is provided with a target image.
In order to eliminate the smear image, the smear image located in the smear region may be moved to a target region where the target image is located.
Step 13: and superposing the smear image and the target image, and processing the superposed image to eliminate the smear image in the first image to obtain a second image.
And moving the smear image in the smear region to a target region, overlapping the pixel value of the smear image and the pixel value of the target image, and processing the overlapped image so as to eliminate the smear image in the first image and obtain a second image without smear.
For example, as shown in fig. 2 and 3, the smear image a covers a part of the non-target image (i.e., the background image C), the smear image a is moved to the target area where the target image B is located, so that the smear image a and the target image B are superimposed to form an image D, and then the image D is processed to eliminate the smear image a.
In addition, in order to move the smear image toward the target area, the smear image may be divided into a plurality of images to be moved, and the smear may be divided into a plurality of smaller images by rows or columns and then moved.
Different from the prior art, the embodiment provides a method for eliminating image smear, which includes the steps of firstly, acquiring a smear region and a target region corresponding to the smear region in a first image; then moving the smear image in the smear area to a target area where the target image is located; and then, the smear image and the target image are superposed, and the superposed image is processed to eliminate the smear image in the first image to obtain a second image without smear, so that the smear in the image can be eliminated, and the image quality is improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of another embodiment of a method for eliminating image smear provided in the present application, where the method includes:
step 41: a smear region and a target region corresponding to the smear region in the first image are acquired.
Step 42: and moving the smear image positioned in the smear area to a target area, wherein the target area is provided with a target image.
The pixel value of the smear image is the same as the pixel value of the target image, and the shape and size of the smear image are the same as those of the target image.
Steps 41 to 42 are similar to steps 11 to 12 in the above embodiments, and are not described again here.
Step 43: the displacement between the smear region and the target region is acquired.
In order to move the smear image to the target area where the target image is located, the displacement between the smear area and the target area may be acquired.
Step 44: and moving the smear image into the target area according to the displacement.
The smear image may be moved from the smear region to the target region according to a displacement value between the smear region and the target region.
Step 45: and superposing the smear image and the target image, and acquiring the pixel value of the superposed image.
And correspondingly superposing the pixel value of the target image and the pixel value of the smear image, thereby obtaining the pixel value of the superposed image.
Step 46: and subtracting the pixel value of the smear image from the pixel value of the superposed image so as to eliminate the smear image moved to the target area, thereby obtaining a second image.
And subtracting the pixel value of the smear image from the pixel value of the image after the target area is superposed, so that the smear image moved to the target area can be eliminated, and a second image without smear is obtained.
Different from the prior art, the embodiment provides an image smear elimination method, which includes acquiring displacements of a smear region and a target region in a first image; moving the smear image positioned in the smear region to a target region according to the displacement value; and then, superposing the smear image and the target image, acquiring the pixel value of the superposed image, and eliminating the smear image from the superposed image, thereby obtaining a second image without smear, realizing elimination of smear in the image and improving the image quality.
Referring to fig. 5, fig. 5 is a schematic flowchart of a method for eliminating image smear according to another embodiment of the present application, where the method includes:
step 51: and comparing the first image with the third image to obtain the pixel value of the smear image and the target area.
To obtain pixel values of the smear image, the pixel values of the first image and the third image may be subtracted to obtain pixel values of the smear image; wherein the third image is a smear-free image; since the third image is a smear-free image, the pixel value of the smear image can be obtained by correspondingly subtracting the pixel value of the third image from the pixel value of the first image, and the area where the smear image is located forms a smear area.
The pixel value of the smear image is the same as that of the target image, and the shape and the size of the smear image are the same as those of the target image.
After the pixel value of the smear image is obtained, the target area can be obtained by comparing the smear image with the third image; specifically, the pixel value of the smear image and the pixel value of the third image may be subjected to traversal search and matching, so that the target region where the target image is located may be obtained.
For example, as shown in fig. 6, the first image is processed so that the pixel value of the first image except the smear region a is the pixel value of the smear image, the pixel values of other regions are all 0, then each pixel value of the smear region a is matched with each pixel value of the third image, the first pixel value a5 in the smear region a is matched with each pixel value of the third image, the position of the same pixel value as the pixel value a5 in the third image is recorded, the next pixel value a6 in the smear region a is matched with the next pixel value of the marked position in the third image, and the operation is repeatedly performed, so that the target region B can be detected.
Step 52: and subtracting the pixel value of the smear image from the pixel value of the image in the smear area to obtain the pixel value of the background image, and storing the pixel value of the background image.
Wherein, the background image is an image covered by the smear image.
After the pixel value of the smear image is acquired, in order to restore the background image covered by the smear image, the pixel value of the background image may be obtained by subtracting the pixel value of the smear image from the pixel value of the image located in the smear region, and the pixel value of the background image may be stored.
For example, as shown in fig. 7, the smear image is located in the smear region a, the pixel value of the smear image and the pixel value of the background image are superimposed in the background region B, and the pixel value of the background region B and the pixel value of the smear image may be subtracted to obtain the pixel value of the background image in order to eliminate the smear in the background region B.
Step 53: and acquiring the distance and the azimuth angle between the smear image and the target image.
After the pixel values of the background image are acquired, since the smear image located in the smear region is to be moved to the target region, the distance and the azimuth angle between the smear image and the target image may be acquired first.
Step 54: the smear image is moved a distance in the direction of the azimuth angle so that the smear image moves into the target area.
After the distance and the azimuth angle between the smear image and the target image are acquired, the smear image is moved along the direction of the azimuth angle for the acquired distance, and the smear image is removed from the smear area, specifically, the background image is restored according to the pixel values of the background image, that is, the background area is filled with the stored pixel values of the background image to restore the background image.
For example, as shown in fig. 8, by moving the smear image a along the direction angle α by the distance L, the smear image a can be moved to the target area B while the pixel values of the background area covered by the smear image a are set as the pixel values of the stored background image.
Step 55: and superposing the smear image and the target image to obtain the pixel value of the superposed image.
Step 56: and subtracting the pixel value of the smear image from the pixel value of the superposed image so as to eliminate the smear image moved to the target area, thereby obtaining a second image.
After the smear image is moved along the direction angle to obtain a long distance, moving the smear image to a target area, superposing the smear image and the target image, and obtaining a pixel value of the superposed image; in order to eliminate the smear image of the target area, the pixel value of the smear image may be subtracted from the pixel value of the superimposed image to obtain a second image without smear, and the smear image in the first image is eliminated.
When a camera is used for shooting, a smear image may be generated, light rays enter the camera from a lens, the CCD performs color filtering and light sensing, a shot object is decomposed into a plurality of pixel points according to a certain arrangement mode, the pixel points are transferred to an analog-to-digital converter in the form of analog image signals, converted into digital signals, transmitted to an image processor, processed into a real image, and then compressed and stored in a storage medium; in order to prevent stroboflash during photographing, when the smear image is moved, a method of decreasing the pixel value may be adopted, and the pixel value of the smear image is gradually decreased in the process of moving the smear image toward the target area along the direction angle, so as to prevent screen flash caused by suddenly removing the smear image.
Different from the prior art, the embodiment provides an image smear elimination method, which includes acquiring a distance and a direction angle between a smear region and a target region in a first image; moving the smear image positioned in the smear area to a target area according to the distance length and the direction angle; and then, superposing the smear image and the target image, acquiring the pixel value of the superposed image, and eliminating the smear image from the superposed image, thereby obtaining a second image without smear, realizing elimination of smear in the image and improving the image quality.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of an electronic device 90 provided in the present application, where the electronic device includes: a memory 91 and a processor 92 connected to each other, the memory 91 being used for storing a computer program, which when executed by the processor 92, is used for implementing the method for eliminating image smear in the above-described embodiment.
Referring to fig. 10, a schematic structural diagram of an embodiment of a storage medium provided in the present application is shown, where the storage medium 100 is used to store a computer program 101, and the computer program 101 is used to implement the method for eliminating image smear in the foregoing embodiment when being executed by a processor.
The storage medium 100 may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules or units is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above embodiments are merely examples, and not intended to limit the scope of the present application, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present application, or those directly or indirectly applied to other related arts, are included in the scope of the present application.

Claims (5)

1. A method for eliminating image smear, comprising:
the method comprises the steps of obtaining a pixel value of a smear image by subtracting the pixel value of a first image and the pixel value of a third image, wherein the third image is an image without smear;
traversing, searching and matching the pixel value of the smear image and the pixel value of the third image to obtain a target area, wherein the target area is the area where the target image is located, the pixel value of the smear image is the same as the pixel value of the target image, and the shape and the size of the smear image are the same as those of the target image;
subtracting the pixel value of the smear image from the pixel value of the image in the smear region to obtain the pixel value of a background image, and storing the pixel value of the background image, wherein the background image is an image covered by the smear image;
acquiring the distance and the azimuth angle between the smear image and the target image;
moving the smear image a distance in the direction of the azimuth angle such that the smear image moves into the target area;
and superposing the smear image and the target image, acquiring a pixel value of the superposed image, and subtracting the pixel value of the smear image from the pixel value of the superposed image to eliminate the smear image in the first image to obtain a second image.
2. The method of eliminating image smear according to claim 1,
before the step of superimposing the smear image and the target image, the method includes:
acquiring displacement between the smear region and the target region;
and moving the smear image into the target area according to the displacement.
3. The method of eliminating image smear according to claim 1, further comprising:
and restoring the background image according to the pixel value of the background image.
4. An electronic device, comprising a memory and a processor connected to each other, the memory being configured to store a computer program, which, when executed by the processor, is configured to implement the method of eliminating image smear of any one of claims 1-3.
5. A storage medium storing a computer program for implementing the method of eliminating image smear according to any one of claims 1 to 3 when the computer program is executed by a processor.
CN201811239846.5A 2018-10-23 2018-10-23 Image smear elimination method, electronic device and storage medium Active CN109636731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811239846.5A CN109636731B (en) 2018-10-23 2018-10-23 Image smear elimination method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811239846.5A CN109636731B (en) 2018-10-23 2018-10-23 Image smear elimination method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN109636731A CN109636731A (en) 2019-04-16
CN109636731B true CN109636731B (en) 2020-11-13

Family

ID=66066640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811239846.5A Active CN109636731B (en) 2018-10-23 2018-10-23 Image smear elimination method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN109636731B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166710A (en) * 2019-06-21 2019-08-23 上海闻泰电子科技有限公司 Image composition method, device, equipment and medium
CN112487946A (en) * 2020-11-26 2021-03-12 努比亚技术有限公司 Human body moving target removing method and device, mobile terminal and storage medium
US11704777B2 (en) 2021-08-27 2023-07-18 Raytheon Company Arbitrary motion smear modeling and removal
CN114923629A (en) * 2022-04-29 2022-08-19 海门市苏洋机械制造有限公司 Method for detecting vibration amplitude of spinning high-speed spindle during rotation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182940A (en) * 2014-08-20 2014-12-03 苏州阔地网络科技有限公司 Blurred image restoration method and system
CN105389780A (en) * 2015-10-28 2016-03-09 维沃移动通信有限公司 Image processing method and mobile terminal
CN108574794A (en) * 2018-03-30 2018-09-25 京东方科技集团股份有限公司 Image processing method, device and display equipment, computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4106874B2 (en) * 2001-02-05 2008-06-25 ソニー株式会社 Image processing apparatus and method, and recording medium
JP4561845B2 (en) * 2008-02-29 2010-10-13 カシオ計算機株式会社 Imaging apparatus and image processing program
US8508606B2 (en) * 2009-11-20 2013-08-13 Hon Hai Precision Industry Co., Ltd. System and method for deblurring motion blurred images
CN102629969A (en) * 2012-03-30 2012-08-08 邓晓波 Smear eliminating method during shooting of plane objects

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182940A (en) * 2014-08-20 2014-12-03 苏州阔地网络科技有限公司 Blurred image restoration method and system
CN105389780A (en) * 2015-10-28 2016-03-09 维沃移动通信有限公司 Image processing method and mobile terminal
CN108574794A (en) * 2018-03-30 2018-09-25 京东方科技集团股份有限公司 Image processing method, device and display equipment, computer readable storage medium

Also Published As

Publication number Publication date
CN109636731A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN109636731B (en) Image smear elimination method, electronic device and storage medium
US10771697B2 (en) Still image stabilization/optical image stabilization synchronization in multi-camera image capture
JP6347675B2 (en) Image processing apparatus, imaging apparatus, image processing method, imaging method, and program
US7154541B2 (en) Image processing device
US20140293004A1 (en) Image processing apparatus and method, and image capturing apparatus
WO2018102302A1 (en) Digital correction of optical system aberrations
US8537239B2 (en) Image processing method, image processing apparatus and image processing program
JP2004343519A (en) Imaging apparatus and image processing apparatus
US8629908B2 (en) Method for detecting a moving object in a sequence of images captured by a moving camera, computer system and computer program product
US20140293076A1 (en) Image pickup apparatus, image processing system, image pickup system, image processing method, and non-transitory computer-readable storage medium
WO2014038629A1 (en) Moving body detection method
JPS60500237A (en) Resolution improvement and zooming by deterioration evaluation
JP5619124B2 (en) Image processing apparatus, imaging apparatus, image processing program, and image processing method
KR102069269B1 (en) Apparatus and method for stabilizing image
JP2015177244A (en) Image processing apparatus and image processing method
WO1993019430A1 (en) A machine method for compensating for non-linear picture transformations, e.g. zoom and pan, in a video image motion compensation system
CN111192286A (en) Image synthesis method, electronic device and storage medium
US20160307303A1 (en) Image capture device
JP6576179B2 (en) Image processing apparatus, image processing method, and program
US20170150111A1 (en) Image processing system with aliasing detection mechanism and method of operation thereof
CN110089103B (en) Demosaicing method and device
CN110689502B (en) Image processing method and related device
KR102183518B1 (en) Image-processing apparatus to reduce staircase artifacts from an image signal
JP2018056892A (en) Image processing device
CN108717684B (en) High-speed horizontal moving object image sequence splicing method and system based on array camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230629

Address after: Room 2103, Office Building 1, No. 213 Funing Road, Zumiao Street, Chancheng District, Foshan City, Guangdong Province, 528000, F008

Patentee after: Foshan Huayue Intellectual Property Operation Co.,Ltd.

Address before: 516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West

Patentee before: HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd.