CN112261241A - Image processing method and device and electronic equipment - Google Patents

Image processing method and device and electronic equipment Download PDF

Info

Publication number
CN112261241A
CN112261241A CN202011155876.5A CN202011155876A CN112261241A CN 112261241 A CN112261241 A CN 112261241A CN 202011155876 A CN202011155876 A CN 202011155876A CN 112261241 A CN112261241 A CN 112261241A
Authority
CN
China
Prior art keywords
image
background
main
pixel area
target
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.)
Granted
Application number
CN202011155876.5A
Other languages
Chinese (zh)
Other versions
CN112261241B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202011155876.5A priority Critical patent/CN112261241B/en
Publication of CN112261241A publication Critical patent/CN112261241A/en
Application granted granted Critical
Publication of CN112261241B publication Critical patent/CN112261241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/40093Modification of content of picture, e.g. retouching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/409Edge or detail enhancement; Noise or error suppression

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image processing method, an image processing device and electronic equipment, wherein an image of a target object on a first surface is obtained; obtaining an image of the target object on the second surface; obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface; according to the relation between the image of the main surface and the image of the background surface, the image of the main surface and/or the image of the background surface are/is adjusted to remove interference information of the image of the background surface existing in the image of the main surface to the image of the main surface, so that the influence of the image of the background surface to the image of the main surface on the shooting effect is eliminated.

Description

Image processing method and device and electronic equipment
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image processing method and apparatus, and an electronic device.
Background
Under the condition that images exist on both sides of a certain paper document, the image content in any side of the paper document usually transmits to the other side, and after the image on one side of the paper document is shot by using a camera, the obtained shot image also contains the image content transmitted by the other side, that is, the image content transmitted by the other side can affect the image shooting effect on one side of the paper document.
Disclosure of Invention
In view of the above, the present application provides an image processing method, an image processing apparatus, and an electronic device, so as to eliminate an influence of an image of a background plane on an image of a main plane in terms of a shooting effect.
The application provides the following technical scheme:
a method of image processing, the method comprising:
obtaining an image of the object on the first surface;
obtaining an image of the target object on a second surface;
obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface;
and adjusting the image of the main surface and/or the image of the background surface according to the relation between the image of the main surface and the image of the background surface so as to remove interference information existing in the image of the main surface, wherein the interference information is interference information of the image of the background surface on the image of the main surface.
Preferably, the obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface includes:
determining a main surface and a background surface in the first surface and the second surface according to identification information of a user on the image of the first surface and/or the image of the second surface;
or, according to the identification information contained in the first surface and/or the second surface, determining a main surface and a background surface in the first surface and the second surface;
or the like, or, alternatively,
and analyzing the image of the first surface and/or the image of the second surface according to a preset main/back surface determination rule to determine a main surface and a background surface of the first surface and the second surface.
Preferably, the adjusting the image of the main surface and/or the image of the background surface according to the relationship between the image of the main surface and the image of the background surface includes:
and adjusting at least part of pixel areas in the image of the main surface according to the relation between the image of the main surface and the image of the background surface, wherein the at least part of pixel areas are related to the image corresponding to the background surface.
Preferably, the adjusting at least a part of the pixel area in the image of the main surface according to the relationship between the image of the main surface and the image of the background surface includes:
respectively carrying out binarization processing on the image of the main surface and the image of the background surface to obtain a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface;
determining a target pixel area from the main pixel area based on a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface, wherein the binarization result of the target pixel area and the binarization result of the background pixel area corresponding to the target pixel area in the background pixel area are the same target value, and the target value represents that the target pixel area has pixel content;
and adjusting the binarization result of the target pixel area according to the size relation between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the original pixel value.
Preferably, the adjusting the binarization result of the target pixel region according to the magnitude relationship between the original pixel value of each target pixel region and the original pixel value of each corresponding background pixel region includes:
obtaining the difference value between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the target pixel area;
and adjusting the binarization result of the target pixel area with the difference value smaller than the first preset threshold value from the target value to a non-target value.
Preferably, in the case that the difference between the original pixel value of the target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region is greater than or equal to a first preset threshold, the method further includes:
judging whether the difference value between the original pixel value of the target pixel area and the original pixel value of the corresponding background pixel area is larger than a second preset threshold value, wherein the second preset threshold value is larger than the first preset threshold value;
and adjusting the binarization result of the background pixel area corresponding to the target pixel area with the difference value not greater than the second preset threshold value from the target value to a non-target value.
Preferably, after the adjusting the image of the main surface and/or the image of the background surface according to the relationship between the image of the main surface and the image of the background surface, the method further includes:
and denoising the adjusted image of the main surface and/or the adjusted image of the background surface.
An image processing apparatus, the apparatus comprising:
a first surface image acquisition unit for acquiring an image of the target object on a first surface;
a second surface image acquisition unit, configured to acquire an image of the target object on a second surface;
a main/back surface recognition unit configured to obtain a main surface and a background surface of the first surface and the second surface from the image of the first surface and the image of the second surface;
and the image adjusting unit is used for adjusting the image of the main surface and/or the image of the background surface according to the relation between the image of the main surface and the image of the background surface so as to remove interference information existing in the image of the main surface, wherein the interference information is interference information of the image of the background surface on the image of the main surface.
An electronic device, the electronic device comprising: a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program for executing at least the image processing method as described above.
Compared with the prior art, the image processing method, the image processing device and the electronic equipment are provided, and the image of the target object on the first surface is obtained; obtaining an image of the target object on a second surface; obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface; according to the relation between the image of the main surface and the image of the background surface, the image of the main surface and/or the image of the background surface are/is adjusted to remove interference information of the image of the background surface on the image of the main surface, wherein the interference information exists in the image of the main surface, so that the influence of the image of the background surface on the image of the main surface on the shooting effect is eliminated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present application;
fig. 2 is a flowchart of a method for adjusting at least a part of pixel areas in an image of a main surface according to a relationship between the image of the main surface and an image of a background surface according to an embodiment of the present application;
fig. 3 is a block diagram of an image processing apparatus according to an embodiment of 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 of 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.
In the case of images on both sides of a certain paper document, if the paper of the paper document is thin, the image content in any side of the paper document usually transmits to the other side, and after the image on one side of the paper document is captured by the camera, the captured image obtained also includes the image content transmitted from the other side, such as: the image content transmitted from the other side is overlapped with the image content of the shooting side, or the image content transmitted from the other side is directly displayed in a blank area in the shooting side, that is, the image content transmitted from the other side can affect the image shooting effect of one side of the paper document.
In order to solve the technical problem, the embodiment of the invention discloses an image processing method, an image processing device and electronic equipment, wherein an image of a target object on a first surface is obtained; obtaining an image of the target object on a second surface; obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface; according to the relation between the image of the main surface and the image of the background surface, the image of the main surface and/or the image of the background surface are/is adjusted to remove interference information of the image of the background surface on the image of the main surface, wherein the interference information exists in the image of the main surface, so that the influence of the image of the background surface on the image of the main surface on the shooting effect is eliminated.
The following describes an image processing method provided by an embodiment of the present invention, and fig. 1 is a flowchart of the image processing method provided by the embodiment of the present invention, and referring to fig. 1, the method may include:
s100, obtaining an image of a target object on a first surface;
it should be noted that the target object in the present invention refers to a paper document, or a document in which image content in one side of other material is transmitted to the other side.
The first side may refer to any side of the object, and the embodiment of the present invention is not particularly limited.
Optionally, the invention may obtain the image of the target object on the first surface by using an image acquisition mode, such as camera acquisition.
Step S110, obtaining an image of the target object on a second surface;
the second surface refers to a surface of the object having a front-back relationship with the first surface.
Optionally, the invention may obtain the image of the target object on the second surface by using an image acquisition mode, such as camera acquisition.
Step S120, obtaining a main surface and a background surface in the first surface and the second surface according to the image of the first surface and the image of the second surface;
the main surface is a surface of the object on which the main image content exists, or a surface to which the user pays attention, and the other surface of the object is a background surface after the main surface is specified.
The following gives the way to obtain the main and background faces of the first and second faces from the image of the first and second faces as follows:
the first method is as follows: and determining a main surface and a background surface in the first surface and the second surface according to identification information of the image of the first surface and/or the image of the second surface by a user.
In some cases, the user may add a mark to the image of the first side and/or the image of the second side of the target object to identify the main side and the background side of the first side and the second side.
Optionally, the identifier added by the user may be specifically a symbol, an icon, an image, and the like, and the embodiment of the present invention is not specifically limited, and the user may select to add the identifier in both the first surface and the second surface, and may also select to add the identifier in only one of the surfaces.
The second method comprises the following steps: and determining a main surface and a background surface in the first surface and the second surface according to the identification information contained in the first surface and/or the second surface.
It should be noted that, in some cases, the main surface and the background surface may be identified in the first surface and/or the second surface of the object by means of a mark, such as a title mark, a page number mark, a specific image mark, and the like, and the embodiment of the present invention is not particularly limited.
By identifying the identification information contained in the first side and/or the second side, the main side and the background side of the first side and the second side can be determined.
The third method comprises the following steps: and analyzing the image of the first surface and/or the image of the second surface according to a preset main/back surface determination rule to determine a main surface and a background surface of the first surface and the second surface.
The embodiment of the invention can also determine the main surface and the background surface in the first surface and the second surface by analyzing and identifying the image of the first surface and/or the image of the second surface.
The main surface and the background surface of the first surface and the second surface can be determined in a specific manner of identifying whether the image of the first surface and/or the image of the second surface contains preset content.
The preset content may refer to preset image content, or image content with a preset color, or may refer to preset text content, or text content with a preset font, and the like, which is not specifically limited in the embodiment of the present invention.
Step S130, according to a relationship between the image of the main surface and the image of the background surface, adjusting the image of the main surface and/or the image of the background surface to remove interference information existing in the image of the main surface, where the interference information is interference information of the image of the background surface with the image of the main surface.
It should be noted that, in the embodiment of the present invention, a manner of adjusting pixels in an image may be adopted to remove interference information existing in the image of the main surface, and specifically, at least a part of pixel regions in the image of the main surface may be adjusted according to a relationship between the image of the main surface and the image of the background surface to remove interference information existing in the image of the main surface, where the at least a part of pixel regions are related to the image corresponding to the background surface.
Optionally, in the embodiment of the present invention, an image of the target object on the first surface is obtained; obtaining an image of the target object on a second surface; obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface; according to the relation between the image of the main surface and the image of the background surface, the image of the main surface and/or the image of the background surface are/is adjusted to remove interference information of the image of the background surface on the image of the main surface, wherein the interference information exists in the image of the main surface, so that the influence of the image of the background surface on the image of the main surface on the shooting effect is eliminated.
It should be noted that, in some cases, after the image in the target object is captured, the captured image is subjected to subsequent processing analysis (such as binarization processing) to obtain some information from the captured image, and if there is interference information in the image of the main surface, the subsequent processing analysis result on the image of the main surface is affected.
In the embodiment of the present invention, the image of the main surface and/or the image of the background surface are adjusted in the above manner, and after the interference information of the image of the background surface to the image of the main surface, which is present in the image of the main surface, is removed, the influence of the image of the background surface to the image of the main surface in the aspect of the shooting effect is eliminated, so that the accuracy of the subsequent processing and analysis of the image of the main surface can be further improved, for example, the accuracy of the result of the binarization processing to the image of the main surface is improved.
A specific embodiment of the present invention will be described in detail below in a specific embodiment, where a specific manner of adjusting at least a part of pixel regions in the image of the main surface according to a relationship between the image of the main surface and the image of the background surface is disclosed in the present invention, and fig. 2 is a flowchart of a method for adjusting at least a part of pixel regions in the image of the main surface according to a relationship between the image of the main surface and the image of the background surface, and with reference to fig. 2, the method may include:
step S200, performing binarization processing on the image of the main surface and the image of the background surface respectively to obtain a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface;
optionally, the binarization processing manner at least includes: the Otsu threshold method, the Sauvol method, the binarization method based on any neural network such as a segmentation network and a countermeasure network, etc., and the embodiments of the present invention are not particularly limited.
The main pixel area and the background pixel area may be the size of one pixel unit, or may be the sizes of several pixel units.
If the pixel point set corresponding to a main pixel area is A _ (i, j) and the pixel point set corresponding to the background pixel area corresponding to the main pixel area is B _ (i, j), the binarization result corresponding to the main pixel area is F (A _ (i, j)), and the binarization result corresponding to the background pixel area is F (B _ (i, j)).
Both values of F (A _ (i, j)) and F (B _ (i, j)) may be 1 and 0, where 1 indicates that the gray-level value of the pixel region is greater than or equal to the predetermined gray-level value, and 0 indicates that the gray-level value of the pixel region is less than the predetermined gray-level value.
Step S210, determining a target pixel area from the main pixel area based on a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface, wherein the binarization result of the target pixel area and the binarization result of the background pixel area corresponding to the target pixel area in the background pixel area are the same target value, and the target value represents that the target pixel area has pixel content;
in the image of the main surface, if a certain main pixel area has pixel content, but the background pixel area in the image of the background surface at the position in the positive and negative plane symmetrical relation with the main pixel area having the pixel content does not have the pixel content, the image of the background surface does not influence the image of the main surface, and subsequent adjustment is not needed; if a certain main pixel area does not have pixel content, but has pixel content in the background pixel area at the position in the image of the background surface in front-back plane symmetrical relation with the main pixel area having pixel content, it indicates that the main pixel area does not actually have an image, and the image of the background surface does not affect the image of the main surface, and subsequent adjustment is not needed.
In the image of the main surface, if a certain main pixel region has pixel contents and also has pixel contents in the background pixel region at a position in front-to-back plane symmetry relationship with the main pixel region having pixel contents in the image of the background surface, the main pixel region having pixel contents is determined as a target pixel region. In this case, it is possible to actually have an image at the position of the target pixel region and at the position of the background pixel region corresponding thereto; it is also possible to have an image only at the position of the target pixel area and not actually at the position of the background pixel area corresponding thereto; it is also possible that there is actually no image at the position of the target pixel area and there is actually an image at the position of the background pixel area corresponding thereto.
In the case where an image is actually present only at the position of the target pixel region and an image is not actually present at the position of the corresponding background pixel region, the content of the pixel recognized in the background pixel region is erroneously recognized as the image at the position of the target pixel region.
However, when there is no image at the position of the target pixel area and there is an image at the position of the corresponding background pixel area, the content of the pixel recognized in the target pixel area is erroneously recognized as the image at the position of the background pixel area.
For example, in the image of the main surface, if the binarization result of a certain main pixel region is 1, and the binarization result of the background pixel region at a position in the image of the background surface in a front-back plane symmetric relationship with the main pixel region having the pixel content is also 1, the main pixel region having the pixel content is determined as the target pixel region.
The target value characterizes the target pixel area as having pixel content, the target value may be 1.
Step S220, adjusting the binarization result of the target pixel region according to the size relationship between the original pixel value of each target pixel region and the original pixel value of each corresponding background pixel region.
In the embodiment of the present invention, according to a size relationship between an original pixel value of each target pixel region and an original pixel value of each corresponding background pixel region, a process of adjusting a binarization result of the target pixel region may include: obtaining the difference value between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the target pixel area; and adjusting the binarization result of the target pixel area with the difference value smaller than the first preset threshold value from the target value to a non-target value.
Specifically, in the present application, a value obtained by comparing an original pixel value of a target pixel region with an original pixel value of a background pixel region corresponding to the target pixel region is used as a difference value between the original pixel value of the target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region.
If the difference value between the original pixel value of a target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region is smaller than a first preset threshold, it is proved that the pixel point identified in the target pixel region is actually a pixel point in the background pixel region corresponding to the target pixel region, that is, an image does not actually exist in the target pixel region, and the pixel point identified in the target pixel region is actually a pixel point obtained by misrecognizing the image in the background pixel region corresponding to the target pixel region.
In this case, the binarization result of the target pixel region having the difference smaller than the first preset threshold is adjusted from the target value to a non-target value, i.e., the binarization result of the target pixel region having the difference smaller than the first preset threshold is corrected.
It should be noted that the first preset threshold may be set by a person skilled in the art, and the embodiment of the present invention is not particularly limited.
Since the target value characterizes the target pixel region as having pixel content therein, correspondingly, the non-target value characterizes the target pixel region as having no pixel content therein, and in the case of a target value of 1, the non-target value may be 0.
In addition, it should be noted that, if the difference between the original pixel value of a target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region is greater than or equal to the first preset threshold, further determining whether the difference between the original pixel value of the target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region is greater than the second preset threshold, and in the case that the difference between the original pixel value of the target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region is greater than the second preset threshold, it indicates that the pixel point identified in the target pixel region is the pixel point of the image actually existing in the target pixel region, and the pixel point identified in the background pixel region corresponding to the target pixel region is obtained by misrecognizing the pixel point of the image actually existing in the target pixel region, so as to prove that the image actually exists in the target pixel region, in the case where there is no image in the background pixel region, the binarization result of the target pixel region does not need to be adjusted.
It should be noted that the size of the second preset threshold is larger than that of the first preset threshold.
If the difference between the original pixel value of the target pixel region and the original pixel value of the corresponding background pixel region is not greater than the second preset threshold, that is, the difference between the original pixel value of the target pixel region and the original pixel value of the corresponding background pixel region is greater than or equal to the first preset threshold, and is less than or equal to a second preset threshold value, indicating that the pixel point identified in the target pixel region is the superposition of the pixel point of the image actually existing in the target pixel region and the pixel point of the image actually existing in the background pixel region corresponding to the target pixel region, proving that the image actually existing in the target pixel region and the image actually existing in the background pixel region are also the images, in this case, the binarization result of the background pixel region corresponding to the target pixel region is adjusted from the target value to a non-target value.
Optionally, after the adjusting the image of the main surface and/or the image of the background surface according to the relationship between the image of the main surface and the image of the background surface, the embodiment of the present invention further includes:
and denoising the adjusted image of the main surface and/or the image of the background surface, so as to avoid false identification caused by the reasons of threshold critical points and the like.
After the target pixel area is determined from the main pixel area by the method, the binarization result of the target pixel area is adjusted according to the size relation between the original pixel value of each target pixel area and the original pixel value of each corresponding background pixel area, so that the interference information of the binarization result of the image of the background surface on the binarization result of the image of the main surface, which exists in the binarization result of the image of the main surface, can be removed, and the influence of the binarization result of the image of the background surface on the binarization result of the image of the main surface can be eliminated.
The following describes an image processing apparatus according to an embodiment of the present invention, and the image processing apparatus described below may be referred to in correspondence with the above image processing method.
Fig. 3 is a block diagram of an image processing apparatus according to an embodiment of the present invention, and referring to fig. 3, the image processing apparatus includes:
a first surface image acquiring unit 300 for acquiring an image of the object on a first surface;
a second surface image obtaining unit 310, configured to obtain an image of the target object on a second surface;
a main/back surface recognition unit 320 for obtaining a main surface and a background surface of the first surface and the second surface from the image of the first surface and the image of the second surface;
an image adjusting unit 330, configured to adjust the image of the main surface and/or the image of the background surface according to a relationship between the image of the main surface and the image of the background surface, so as to remove interference information existing in the image of the main surface, where the interference information is interference information of the image of the background surface with the image of the main surface.
The main/rear surface recognition unit includes:
the first main/back determining unit is used for determining a main surface and a background surface in the first surface and the second surface according to identification information of a user on the image of the first surface and/or the image of the second surface;
or, a second main/back determining unit, configured to determine a main surface and a background surface of the first surface and the second surface according to identification information included in the first surface and/or the second surface;
or the like, or, alternatively,
and the third main/back surface determining unit is used for analyzing the image of the first surface and/or the image of the second surface according to a preset main/back surface determining rule and determining a main surface and a background surface in the first surface and the second surface.
The image adjusting unit includes:
and the pixel area adjusting unit is used for adjusting at least part of pixel areas in the image of the main surface according to the relation between the image of the main surface and the image of the background surface, wherein the at least part of pixel areas are related to the image corresponding to the background surface.
The pixel region adjusting unit includes:
a binarization processing unit, configured to perform binarization processing on the image of the main surface and the image of the background surface respectively to obtain a binarization result corresponding to at least one main pixel region in the image of the main surface and a binarization result corresponding to at least one background pixel region in the image of the background surface;
a target pixel area determination unit, configured to determine a target pixel area from the main pixel area based on a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface, wherein the binarization result of the target pixel area and the binarization result of the background pixel area corresponding to the target pixel area in the background pixel area are the same target value, and the target value represents that the target pixel area has pixel content;
and the binarization result adjusting unit is used for adjusting the binarization result of the target pixel area according to the size relation between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the original pixel value.
The binarization result adjusting unit is specifically configured to:
obtaining the difference value between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the target pixel area;
and adjusting the binarization result of the target pixel area with the difference value smaller than the first preset threshold value from the target value to a non-target value.
When the difference between the original pixel value of the target pixel region and the original pixel value of the background pixel region corresponding to the target pixel region is greater than or equal to a first preset threshold, the binarization result adjusting unit is further configured to:
judging whether the difference value between the original pixel value of the target pixel area and the original pixel value of the corresponding background pixel area is larger than a second preset threshold value, wherein the second preset threshold value is larger than the first preset threshold value;
and adjusting the binarization result of the background pixel area corresponding to the target pixel area with the difference value not greater than the second preset threshold value from the target value to a non-target value.
The device further comprises: a denoising processing unit configured to: and denoising the adjusted image of the main surface and/or the adjusted image of the background surface.
Optionally, an embodiment of the present invention further discloses an electronic device, where the electronic device includes: a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program for executing at least the image processing method as described above.
Technical features described in the embodiments in the present specification may be replaced or combined with each other, each embodiment is described with a focus on differences from other embodiments, and the same and similar portions among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method of image processing, the method comprising:
obtaining an image of the object on the first surface;
obtaining an image of the target object on a second surface;
obtaining a main surface and a background surface of the first surface and the second surface according to the image of the first surface and the image of the second surface;
and adjusting the image of the main surface and/or the image of the background surface according to the relation between the image of the main surface and the image of the background surface so as to remove interference information existing in the image of the main surface, wherein the interference information is interference information of the image of the background surface on the image of the main surface.
2. The method of claim 1, the obtaining a primary facet and a background facet of the first and second facets from the image of the first facet and the image of the second facet comprising:
determining a main surface and a background surface in the first surface and the second surface according to identification information of a user on the image of the first surface and/or the image of the second surface;
or, according to the identification information contained in the first surface and/or the second surface, determining a main surface and a background surface in the first surface and the second surface;
or the like, or, alternatively,
and analyzing the image of the first surface and/or the image of the second surface according to a preset main/back surface determination rule to determine a main surface and a background surface of the first surface and the second surface.
3. The method of claim 1, the adjusting the image of the primary side and/or the image of the background side according to the relationship between the image of the primary side and the image of the background side comprising:
and adjusting at least part of pixel areas in the image of the main surface according to the relation between the image of the main surface and the image of the background surface, wherein the at least part of pixel areas are related to the image corresponding to the background surface.
4. The method of claim 3, wherein the adjusting at least a portion of the pixel area in the image of the primary side according to the relationship between the image of the primary side and the image of the background side comprises:
respectively carrying out binarization processing on the image of the main surface and the image of the background surface to obtain a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface;
determining a target pixel area from the main pixel area based on a binarization result corresponding to at least one main pixel area in the image of the main surface and a binarization result corresponding to at least one background pixel area in the image of the background surface, wherein the binarization result of the target pixel area and the binarization result of the background pixel area corresponding to the target pixel area in the background pixel area are the same target value, and the target value represents that the target pixel area has pixel content;
and adjusting the binarization result of the target pixel area according to the size relation between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the original pixel value.
5. The method according to claim 4, wherein the adjusting the binarization result of the target pixel region according to the magnitude relationship between the original pixel value of each target pixel region and the original pixel value of each background pixel region corresponding to the target pixel region comprises:
obtaining the difference value between the original pixel value of each target pixel area and the original pixel value of each background pixel area corresponding to the target pixel area;
and adjusting the binarization result of the target pixel area with the difference value smaller than the first preset threshold value from the target value to a non-target value.
6. The method according to claim 5, in case that the difference between the original pixel value of the target pixel region and the original pixel value of the background pixel region corresponding thereto is greater than or equal to a first preset threshold, the method further comprising:
judging whether the difference value between the original pixel value of the target pixel area and the original pixel value of the corresponding background pixel area is larger than a second preset threshold value, wherein the second preset threshold value is larger than the first preset threshold value;
and adjusting the binarization result of the background pixel area corresponding to the target pixel area with the difference value not greater than the second preset threshold value from the target value to a non-target value.
7. The method according to any one of claims 1 to 6, further comprising, after adjusting the image of the main face and/or the image of the background face according to a relationship between the image of the main face and the image of the background face:
and denoising the adjusted image of the main surface and/or the adjusted image of the background surface.
8. An image processing apparatus, the apparatus comprising:
a first surface image acquisition unit for acquiring an image of the target object on a first surface;
a second surface image acquisition unit, configured to acquire an image of the target object on a second surface;
a main/back surface recognition unit configured to obtain a main surface and a background surface of the first surface and the second surface from the image of the first surface and the image of the second surface;
and the image adjusting unit is used for adjusting the image of the main surface and/or the image of the background surface according to the relation between the image of the main surface and the image of the background surface so as to remove interference information existing in the image of the main surface, wherein the interference information is interference information of the image of the background surface on the image of the main surface.
9. An electronic device, the electronic device comprising: a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program at least for executing the image processing method of any one of claims 1 to 7.
CN202011155876.5A 2020-10-26 2020-10-26 Image processing method and device and electronic equipment Active CN112261241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011155876.5A CN112261241B (en) 2020-10-26 2020-10-26 Image processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011155876.5A CN112261241B (en) 2020-10-26 2020-10-26 Image processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112261241A true CN112261241A (en) 2021-01-22
CN112261241B CN112261241B (en) 2022-07-26

Family

ID=74262946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011155876.5A Active CN112261241B (en) 2020-10-26 2020-10-26 Image processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112261241B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893514A (en) * 2005-07-08 2007-01-10 虹光精密工业(苏州)有限公司 Method for scanning double-side file and method for generating corresponding image
CN104036469A (en) * 2014-06-27 2014-09-10 天津大学 Method for eliminating word seen-through effect of image during document scanning
US20150215493A1 (en) * 2014-01-28 2015-07-30 Pfu Limited Image processing apparatus, image processing method, and computer-readable, non-transitory medium
CN110971782A (en) * 2018-09-28 2020-04-07 佳能株式会社 Image processing apparatus, control method thereof, and computer-readable storage medium
US20200153994A1 (en) * 2018-11-12 2020-05-14 Xerox Corporation Systems and methods for retaining duplex scanning information in a scanned output file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893514A (en) * 2005-07-08 2007-01-10 虹光精密工业(苏州)有限公司 Method for scanning double-side file and method for generating corresponding image
US20150215493A1 (en) * 2014-01-28 2015-07-30 Pfu Limited Image processing apparatus, image processing method, and computer-readable, non-transitory medium
CN104036469A (en) * 2014-06-27 2014-09-10 天津大学 Method for eliminating word seen-through effect of image during document scanning
CN110971782A (en) * 2018-09-28 2020-04-07 佳能株式会社 Image processing apparatus, control method thereof, and computer-readable storage medium
US20200153994A1 (en) * 2018-11-12 2020-05-14 Xerox Corporation Systems and methods for retaining duplex scanning information in a scanned output file

Also Published As

Publication number Publication date
CN112261241B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
US9251614B1 (en) Background removal for document images
US10275677B2 (en) Image processing apparatus, image processing method and program
KR101822909B1 (en) Method and device for detecting elliptical structure in an image
CN111222506A (en) Color recognition method, apparatus and computer-readable storage medium
CN114820334A (en) Image restoration method and device, terminal equipment and readable storage medium
CN112261241B (en) Image processing method and device and electronic equipment
CN109934858B (en) Image registration method and device
CN115661131B (en) Image identification method and device, electronic equipment and storage medium
JP5732217B2 (en) Image binarization method and image binarization apparatus
CN108876845B (en) Fresnel pattern center determining method and device
CN116129195A (en) Image quality evaluation device, image quality evaluation method, electronic device, and storage medium
JP2000048120A (en) Method for extracting character area of gray level image and recording medium having recorded the program thereon
CN115984178A (en) Counterfeit image detection method, electronic device, and computer-readable storage medium
CN116228644A (en) Image detection method, electronic device and storage medium
CN112215784B (en) Image decontamination method, image decontamination device, readable storage medium and computer equipment
JPH10285399A (en) Binarization method for image
CN108182677A (en) To version detection method, device and computer readable storage medium before print
CN110991451B (en) Correction method and device for card area image of scanned image
CN114820418A (en) Image exception handling method and device, terminal equipment and readable storage medium
CN108961531B (en) Method, device and equipment for identifying serial number of paper currency and storage medium
CN115880300B (en) Image blurring detection method, device, electronic equipment and storage medium
JP7028099B2 (en) Candidate area estimation device, candidate area estimation method, and program
CN112530079B (en) Method, device, terminal equipment and storage medium for detecting bill factors
CN111951254B (en) Edge-guided weighted-average-based source camera identification method and system
CN108764327B (en) Image template detection method and device, computing equipment and readable storage medium

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