CN105894453B - Image processing method and electronic equipment - Google Patents

Image processing method and electronic equipment Download PDF

Info

Publication number
CN105894453B
CN105894453B CN201610201976.4A CN201610201976A CN105894453B CN 105894453 B CN105894453 B CN 105894453B CN 201610201976 A CN201610201976 A CN 201610201976A CN 105894453 B CN105894453 B CN 105894453B
Authority
CN
China
Prior art keywords
image
information
image information
image block
block
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
CN201610201976.4A
Other languages
Chinese (zh)
Other versions
CN105894453A (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 CN201610201976.4A priority Critical patent/CN105894453B/en
Publication of CN105894453A publication Critical patent/CN105894453A/en
Application granted granted Critical
Publication of CN105894453B publication Critical patent/CN105894453B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The embodiment of the invention discloses an image processing method and electronic equipment, wherein the method comprises the following steps: acquiring first image information and second image information, wherein the second image information is partially overlapped with the first image information; respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1; performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information; and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information.

Description

Image processing method and electronic equipment
Technical Field
The present invention relates to image processing technologies, and in particular, to an image processing method applied to an electronic device and an electronic device.
Background
Currently, in the process of screen capture, a long screen capture function is natural in order to solve the problem that the picture of the whole webpage cannot be directly captured due to too long webpage.
However, when the long screen capture function is used, the two front and rear screen images need to be stitched, and the long screen capture can be achieved well. Therefore, how to perfectly realize the splicing processing of the front and rear two-screen images becomes a problem which needs to be solved urgently.
Disclosure of Invention
In view of the above, embodiments of the present invention provide an image processing method and an electronic device to solve the problems in the prior art.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides an image processing method, which comprises the following steps:
acquiring first image information and second image information, wherein the second image information is partially overlapped with the first image information;
respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information, wherein i, j is a positive integer, and i, j ═ M;
and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information.
In an embodiment, the performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information includes:
detecting whether floating image information exists in the first image information and/or the second image information;
if the floating image information does not exist, carrying out image matching by using the Mth image block information in the first image information and the 1 st image block information in the second image information;
the mth image block information in the first image information is the image block information at the bottom of the first image information, and the 1 st image block information in the second image information is the image block information at the top of the second image information.
In an embodiment, the performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information includes:
detecting whether floating image information exists in the first image information and/or the second image information;
if floating image information exists, determining the position of an image block in the first image information and/or the image information where the floating image information is located;
screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information;
and performing image matching by using the ith image block information and the jth image block information.
In an embodiment, the method further comprises:
detecting whether the image block position is on a division line of the image block information in the first image information and/or the second image information;
if the image block is located on a division line of image block information in the first image information and/or the second image information, adjusting the division line based on the position of the image block to obtain adjusted first image information and/or second image information; and performing image matching by using the ith image block information in the adjusted first image information and the jth image block information in the adjusted second image information.
In an embodiment, the method further comprises:
if the image block is not located on a partition line of image block information in the first image information and/or the second image information, screening ith image block information which does not comprise the floating image information from the first image information and/or screening jth image block information which does not comprise the floating image information from the second image information based on the image block position; and performing image matching by using the ith image block information and the jth image block information.
In an embodiment, the adjusting the partition line based on the image block position includes:
and shifting up or down the dividing line based on the image block position so that the dividing line avoids the floating image information, and at least one of M pieces of image block information in the adjusted first image information or second image information contains image block information which does not contain the floating image information.
The embodiment of the invention also provides electronic equipment, which comprises an acquisition module, a segmentation processing module, an image matching module and a splicing processing module;
the acquisition module is used for acquiring first image information and second image information, and the second image information is partially overlapped with the first image information;
the segmentation processing module is used for respectively performing segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
the image matching module is used for performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information, wherein i and j are positive integers, and i, j < ═ M;
and the splicing processing module is used for executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information if matching is successful.
In one embodiment, the image matching module comprises a detection unit and an image matching unit;
the detection unit is used for detecting whether floating image information exists in the first image information and/or the second image information;
the image matching unit is used for performing image matching by using the Mth image block information in the first image information and the 1 st image block information in the second image information if the floating image information does not exist;
the mth image block information in the first image information is the image block information at the bottom of the first image information, and the 1 st image block information in the second image information is the image block information at the top of the second image information.
In one embodiment, the image matching module comprises a detection unit, a determination unit, a screening unit and an image matching unit;
the detection unit is used for detecting whether floating image information exists in the first image information and/or the second image information;
the determining unit is used for determining the position of an image block in the first image information and/or the image information where the floating image information is located if the floating image information exists;
the screening unit is used for screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information;
and the image matching unit is used for performing image matching by using the ith image block information and the jth image block information.
In an embodiment, the image matching module further comprises an adjustment unit;
the detection unit is used for detecting whether the image block position is positioned on a division line of the image block information in the first image information and/or the second image information;
the adjusting unit is configured to, if the image block is located on a dividing line of image block information in the first image information and/or the second image information, adjust the dividing line based on the position of the image block to obtain adjusted first image information and/or second image information;
and the image matching unit is used for performing image matching by using the ith image block information in the adjusted first image information and the jth image block information in the adjusted second image information.
In an embodiment, the filtering unit is further configured to, if the image block information is not located on a dividing line of the image block information in the first image information and/or the second image information, filter an ith image block information not including the floating image information from the first image information and/or filter a jth image block information not including the floating image information from the second image information based on the image block position;
the image matching unit is further configured to perform image matching using the ith image block information and the jth image block information.
In an embodiment, the adjusting unit is further configured to move the dividing line up or down based on the position of the image block, so that the dividing line avoids the floating image information, and at least one of the M pieces of image block information in the adjusted first image information or second image information includes image block information that does not include the floating image information.
In the embodiment of the invention, first image information and second image information are acquired, and the second image information is partially overlapped with the first image information; respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1; performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information; and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information. Therefore, splicing processing of front and back two-screen images can be effectively achieved, and the user experience of the long screen capture function is improved.
Drawings
FIG. 1a is a flowchart illustrating an image processing method according to a first embodiment of the present invention;
FIG. 1b is a diagram illustrating a display effect of image processing according to an exemplary embodiment of the present invention;
FIG. 2a is a flowchart illustrating an image processing method according to a second embodiment of the present invention;
FIG. 2b is a diagram illustrating a display effect of image processing according to an exemplary embodiment of the present invention;
FIG. 3a is a flowchart illustrating an image processing method according to a third embodiment of the present invention;
FIG. 3b is a diagram illustrating the display effect of the acquired image information according to the embodiment of the present invention;
FIG. 3c is a diagram illustrating a display effect of image processing according to an exemplary embodiment of the present invention;
FIG. 4a is a flowchart illustrating an image processing method according to a fourth embodiment of the present invention;
FIG. 4b is a diagram illustrating a display effect of image processing according to an exemplary embodiment of the present invention;
FIG. 4c is a diagram illustrating a fifth display effect of image processing according to an exemplary embodiment of the present invention;
FIG. 5 is a flowchart illustrating an image processing method according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
So that the manner in which the features and aspects of the embodiments of the present invention can be understood in detail, a more particular description of the embodiments of the invention, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings.
Example one
Fig. 1a is a schematic flowchart of an image processing method according to a first embodiment of the present invention, where the image processing method in this example is applied to an electronic device, and as shown in fig. 1a, the image processing method includes the following steps:
step 101, acquiring first image information and second image information;
wherein the second image information is partially overlapped with the first image information.
Specifically, when the long screen capture function is realized, the electronic equipment captures first image information after executing a first screen capture operation triggered by a user; and then, after the user changes the image information in the screen in a mode of pulling down the scroll bar and the like, triggering the second screen capture operation again so that the electronic equipment executes the second screen capture operation and captures the second image information.
102, respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
here, in order to perform subsequent image matching and splicing operations, the electronic device needs to perform segmentation processing on the first image information and the second image information according to a preset segmentation mode, for example, the first image information and the second image information are divided into four parts, and a value of M is obtained as 4, that is, four pieces of image block information are obtained respectively.
Step 103, performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information, wherein i, j is a positive integer, and i, j < ═ M;
specifically, the electronic device may arbitrarily select the ith image block information in the first image information and the jth image block information in the second image information for image matching, if the matching is successful, the subsequent step 104 is continuously executed, otherwise, the image matching operation is repeatedly executed until the matching is successful.
In an embodiment, the performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information includes:
sequentially carrying out image matching on the M-k image block information in the first image information and the 1 st to M image block information in the second image information;
the value of k is a natural number of 0< ═ k < ═ M, the mth image block information is the image block information at the bottom of the first image information or the second image information, and the 1 st image block information is the image block information at the top of the first image information or the second image information.
Of course, in the image matching process, the value sequence of k may be gradually increased or decreased, or may be any other value sequence, where the value sequence of k, that is, the number of the image block information for image matching in the first image information, is not limited.
In another embodiment, the image matching using the ith image block information in the first image information and the jth image block information in the second image information includes:
sequentially utilizing the 1 st to M th image block information in the first image information and the M-n image block information in the second image information to carry out image matching;
the value of n is a natural number of 0< ═ n < ═ M, the mth image block information is the image block information at the bottom of the first image information or the second image information, and the 1 st image block information is the image block information at the top of the first image information or the second image information.
Of course, in the image matching process, the value sequence of n may be gradually increased or decreased, or may be any other value sequence, where the value sequence of n, that is, the number of the image block information in the first image information for image matching, is not limited.
And 104, if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information.
In an example, as shown in fig. 1b, it is assumed that the first image information is divided into four image block information by a quartering division manner, and the image block information is respectively identified by serial numbers a1, a2, A3 and a 4; similarly, the second image information is divided into four pieces of tile information by quartering, and the pieces of tile information are identified by reference numerals B1, B2, B3, and B4, respectively. Before performing stitching, image matching may be performed using tile information with sequence number a4 in the first image information and tile information with sequence numbers B1-B4 in the second image information in sequence. If matching with the tile information with the serial number B1 is successful, a stitching process may be performed based on the tile information with the serial number a4 in the first image information and the tile information with the serial number B1 in the second image information, so as to achieve stitching of the first image information and the second image information.
According to the image processing method, the first image information and the second image information are acquired, and the second image information is partially overlapped with the first image information; respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1; performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information; and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information. Therefore, splicing processing of front and back two-screen images can be effectively achieved, and the user experience of the long screen capture function is improved.
Example two
Fig. 2a is a schematic flowchart of a second image processing method according to an embodiment of the present invention, where the image processing method in this example is applied to an electronic device, and as shown in fig. 2a, the image processing method includes the following steps:
step 201, acquiring first image information and second image information;
wherein the second image information is partially overlapped with the first image information.
Specifically, when the long screen capture function is realized, the electronic equipment captures first image information after executing a first screen capture operation triggered by a user; and then, after the user changes the image information in the screen in a mode of pulling down the scroll bar and the like, triggering the second screen capture operation again so that the electronic equipment executes the second screen capture operation and captures the second image information.
Step 202, performing segmentation processing on the first image information and the second image information respectively to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
here, in order to perform subsequent image matching and splicing operations, the electronic device needs to perform segmentation processing on the first image information and the second image information according to a preset segmentation mode, for example, the first image information and the second image information are divided into four parts, and a value of M is obtained as 4, that is, four pieces of image block information are obtained respectively.
Step 203, detecting whether floating image information exists in the first image information and/or the second image information;
specifically, in the process of performing image stitching, if floating image information exists in a scroll area of a screen, such as a fixed floating icon, the electronic device may first detect the collected first image information and/or second image information to determine whether floating image information exists in the first image information and/or the second image information.
Step 204, if the floating image information does not exist, performing image matching by using the mth image block information in the first image information and the 1 st image block information in the second image information;
specifically, the electronic device may preferentially perform image matching using the mth image block information in the first image information and the 1 st image block information in the second image information. The mth image block information in the first image information is the image block information at the bottom of the first image information, and the 1 st image block information in the second image information is the image block information at the top of the second image information.
Step 205, if the matching is successful, performing stitching processing on the first image information and the second image information based on the mth image block information in the first image information and the 1 st image block information in the second image information.
In one example, as shown in fig. 2b, it is assumed that the first image information is divided into four image block information by dividing into four equal parts, which are respectively identified by the numbers a1, a2, A3 and a 4; similarly, the second image information is divided into four pieces of tile information by quartering, and the pieces of tile information are identified by reference numerals B1, B2, B3, and B4, respectively. Before stitching is performed, when floating image information detection is performed on the first image information and the second image information, and floating image information is determined to be absent in the first image information and the second image information, image matching can be preferentially performed by using image block information with a serial number of A4 in the first image information and image block information with a serial number of B1 in the second image information. If the image matching is successful, a splicing process may be performed based on the image block information with the sequence number of a4 in the first image information and the image block information with the sequence number of B1 in the second image information, so as to splice the first image information and the second image information.
According to the image processing method, the first image information and the second image information are acquired, and the second image information is partially overlapped with the first image information; respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information; detecting whether floating image information exists in the first image information and/or the second image information; if the floating image information does not exist, carrying out image matching by using the Mth image block information in the first image information and the 1 st image block information in the second image information; and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information. Therefore, splicing processing of front and back two-screen images can be effectively achieved, and the user experience of the long screen capture function is improved.
EXAMPLE III
Fig. 3a is a schematic flowchart of a third image processing method according to an embodiment of the present invention, where the image processing method in this example is applied to an electronic device, and as shown in fig. 3a, the image processing method includes the following steps:
step 301, acquiring first image information and second image information;
wherein the second image information is partially overlapped with the first image information.
Specifically, when the long screen capture function is realized, the electronic equipment captures first image information after executing a first screen capture operation triggered by a user; and then, after the user changes the image information in the screen in a mode of pulling down the scroll bar and the like, triggering the second screen capture operation again so that the electronic equipment executes the second screen capture operation and captures the second image information.
Step 302, performing segmentation processing on the first image information and the second image information respectively to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
here, in order to perform subsequent image matching and splicing operations, the electronic device needs to perform segmentation processing on the first image information and the second image information according to a preset segmentation mode, for example, the first image information and the second image information are divided into four parts, and a value of M is obtained as 4, that is, four pieces of image block information are obtained respectively.
Step 303, detecting whether floating image information exists in the first image information and/or the second image information;
specifically, when image stitching is implemented, if floating image information exists in a scroll area of a screen, as shown in fig. 3b, a fixed floating icon "back to top" arrow exists at the bottom of each of first image information (last screen capture) and second image information (next screen capture), the electronic device may first detect the collected first image information and/or second image information to determine whether floating image information exists in the first image information and/or the second image information.
Step 304, if floating image information exists, determining the position of an image block in the first image information and/or the image information where the floating image information is located;
step 305, screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information;
step 306, performing image matching by using the ith image block information and the jth image block information;
step 307, if the matching is successful, performing stitching processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information.
In one example, as shown in fig. 3c, it is assumed that the first image information is divided into four image block information by dividing into four equal parts, which are respectively identified by the numbers a1, a2, A3 and a 4; similarly, the second image information is divided into four pieces of tile information by quartering, and the pieces of tile information are identified by reference numerals B1, B2, B3, and B4, respectively. Before stitching is performed, floating image information detection is performed on the first image information and the second image information, and the floating image information exists in image block information with the sequence number of A4 in the first image information and in image block information with the sequence number of B4 in the second image information; at this time, the image block information with the serial number a3, which does not include the floating image information, may be screened from the first image information, and/or the image block information with the serial number B1, which does not include the floating image information, may be screened from the second image information for image matching. If the image matching is successful, a splicing process may be performed based on the image block information with the sequence number of a3 in the first image information and the image block information with the sequence number of B1 in the second image information, so as to splice the first image information and the second image information.
According to the image processing method provided by the embodiment of the invention, on the basis of respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, whether floating image information exists in the first image information and/or the second image information is detected; if the floating image information exists, determining the position of the image block in the first image information and/or the image information where the floating image information is located; screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information; carrying out image matching by utilizing the ith image block information and the jth image block information; and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information. Therefore, floating image information exists in the rolling area of the screen, and if fixed floating icons and the like exist, the splicing processing of front and back two-screen images is effectively realized by avoiding the mode of image block information containing the floating image information during image matching, and the experience of a user on the long screen capture function is further improved.
Example four
Fig. 4a is a schematic flow chart of a four-image processing method according to an embodiment of the present invention, where the image processing method in this example is applied to an electronic device, and as shown in fig. 4a, the image processing method includes the following steps:
step 401, acquiring first image information and second image information;
wherein the second image information is partially overlapped with the first image information.
Specifically, when the long screen capture function is realized, the electronic equipment captures first image information after executing a first screen capture operation triggered by a user; and then, after the user changes the image information in the screen in a mode of pulling down the scroll bar and the like, triggering the second screen capture operation again so that the electronic equipment executes the second screen capture operation and captures the second image information.
Step 402, performing segmentation processing on the first image information and the second image information respectively to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
here, in order to perform subsequent image matching and splicing operations, the electronic device needs to perform segmentation processing on the first image information and the second image information according to a preset segmentation mode, for example, the first image information and the second image information are divided into four parts, and a value of M is obtained as 4, that is, four pieces of image block information are obtained respectively.
Step 403, detecting whether floating image information exists in the first image information and/or the second image information;
specifically, when image stitching is implemented, if floating image information exists in a scroll area of a screen, as shown in fig. 3b, a fixed floating icon "back to top" arrow exists at the bottom of each of first image information (last screen capture) and second image information (next screen capture), the electronic device may first detect the collected first image information and/or second image information to determine whether floating image information exists in the first image information and/or the second image information.
Step 404, if floating image information exists, determining the position of an image block in the first image information and/or the image information where the floating image information is located;
step 405, detecting whether the image block position is on a partition line of image block information in the first image information and/or the second image information;
step 406, if the image block is located on a dividing line of the image block information in the first image information and/or the second image information, adjusting the dividing line based on the position of the image block to obtain adjusted first image information and/or second image information;
specifically, the electronic device moves the dividing line up or down based on the position of the image block, so that the dividing line avoids the floating image information, and at least one of the M pieces of image block information in the adjusted first image information or second image information does not include the floating image information.
Step 407, performing image matching by using the ith image block information in the adjusted first image information and the jth image block information in the adjusted second image information;
and step 408, if the matching is successful, executing stitching processing on the first image information and the second image information based on the ith image block information in the adjusted first image information and the jth image block information in the second image information.
In one example, as shown in fig. 4b, it is assumed that the first image information is divided into four image block information by dividing into four equal parts, which are respectively identified by the numbers a1, a2, A3 and a 4; similarly, the second image information is divided into four pieces of tile information by quartering, and the pieces of tile information are identified by reference numerals B1, B2, B3, and B4, respectively. Before stitching is performed, floating image information detection is performed on the first image information and the second image information, and floating image information is determined to exist on the dividing lines of the image block information with the sequence numbers of A3 and A4 in the first image information, the dividing lines can be moved downwards, so that at least image block information with the sequence number of A4, which does not include the floating image information, exists in the four image block information in the adjusted first image information; and then, image matching is performed by using the image block information of the A4 and any image block information, such as the image block information with the serial number of B1, of the second image information, wherein the image block information does not include the floating image information. If the image matching is successful, a splicing process may be performed based on the image block information with the sequence number of a4 in the first image information and the image block information with the sequence number of B1 in the second image information, so as to splice the first image information and the second image information.
In another example, as shown in fig. 4c, it is assumed that the first image information is divided into four tile information by a quartering division, which are respectively identified by sequence numbers a1, a2, A3, and a 4; similarly, the second image information is divided into four pieces of tile information by quartering, and the pieces of tile information are identified by reference numerals B1, B2, B3, and B4, respectively. Before stitching is performed, floating image information detection is performed on the first image information and the second image information, and floating image information is determined to exist on the dividing lines of the image block information with the sequence numbers of A1 and A2 in the first image information, the dividing lines can be moved upwards, so that at least image block information with the sequence number of A1, which does not include the floating image information, exists in the four image block information in the adjusted first image information; and then, image matching is performed by using the image block information of the A1 and any image block information, such as the image block information with the serial number of B1, of the second image information, wherein the image block information does not include the floating image information. If the image matching is successful, a splicing process may be performed based on the image block information with the sequence number of a1 in the first image information and the image block information with the sequence number of B1 in the second image information, so as to splice the first image information and the second image information.
By the image processing method, the position of the dividing line can be adjusted in an upward or downward moving mode when floating image information exists in a rolling area of a screen, such as a fixed suspension icon, so that image block information containing the floating image information is avoided during image matching, splicing processing of front and rear two-screen images is effectively achieved, and user experience of a long screen capture function is improved.
EXAMPLE five
Fig. 5 is a schematic flowchart of a fifth image processing method according to an embodiment of the present invention, where the image processing method in this example is applied to an electronic device, and as shown in fig. 5, the image processing method includes the following steps:
step 501, acquiring first image information and second image information;
wherein the second image information is partially overlapped with the first image information.
Specifically, when the long screen capture function is realized, the electronic equipment captures first image information after executing a first screen capture operation triggered by a user; and then, after the user changes the image information in the screen in a mode of pulling down the scroll bar and the like, triggering the second screen capture operation again so that the electronic equipment executes the second screen capture operation and captures the second image information.
Step 502, performing segmentation processing on the first image information and the second image information respectively to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
here, in order to perform subsequent image matching and splicing operations, the electronic device needs to perform segmentation processing on the first image information and the second image information according to a preset segmentation mode, for example, the first image information and the second image information are divided into four parts, and a value of M is obtained as 4, that is, four pieces of image block information are obtained respectively.
Step 503, detecting whether floating image information exists in the first image information and/or the second image information;
specifically, when image stitching is implemented, if floating image information exists in a scroll area of a screen, as shown in fig. 3b, a fixed floating icon "back to top" arrow exists at the bottom of each of first image information (last screen capture) and second image information (next screen capture), the electronic device may first detect the collected first image information and/or second image information to determine whether floating image information exists in the first image information and/or the second image information.
Step 504, if floating image information exists, determining the position of an image block in the first image information and/or the image information where the floating image information is located;
step 505, detecting whether the image block position is on a dividing line of the image block information in the first image information and/or the second image information;
step 506, if the image block is not located on the dividing line of the image block information in the first image information and/or the second image information, screening ith image block information without the floating image information from the first image information and/or screening jth image block information without the floating image information from the second image information based on the image block position;
step 507, performing image matching by using the ith image block information and the jth image block information;
step 508, if the matching is successful, performing stitching processing on the first image information and the second image information based on the ith image block information in the adjusted first image information and the jth image block information in the second image information.
By the image processing method, when floating image information exists in a rolling area of a screen, such as a fixed floating icon, the splicing processing of front and back two-screen images can be effectively realized by avoiding image block information containing the floating image information during image matching, and the experience of a user on a long screen capture function is further improved.
EXAMPLE six
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device 60 includes an acquisition module 601, a segmentation processing module 602, an image matching module 603, and a stitching processing module 604;
the acquisition module 601 is configured to acquire first image information and second image information, where the second image information and the first image information have a partial overlap;
the segmentation processing module 602 is configured to perform segmentation processing on the first image information and the second image information respectively to obtain M pieces of image block information, where M is a positive integer greater than 1;
the image matching module 603 is configured to perform image matching by using the ith image block information in the first image information and the jth image block information in the second image information, where i and j are positive integers, and i, j < ═ M;
the stitching processing module 604 is configured to, if matching is successful, perform stitching processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information.
In one embodiment, the image matching module comprises a detection unit and an image matching unit;
the detection unit is used for detecting whether floating image information exists in the first image information and/or the second image information;
the image matching unit is used for performing image matching by using the Mth image block information in the first image information and the 1 st image block information in the second image information if the floating image information does not exist;
the mth image block information in the first image information is the image block information at the bottom of the first image information, and the 1 st image block information in the second image information is the image block information at the top of the second image information.
In one embodiment, the image matching module comprises a detection unit, a determination unit, a screening unit and an image matching unit;
the detection unit is used for detecting whether floating image information exists in the first image information and/or the second image information;
the determining unit is used for determining the position of an image block in the first image information and/or the image information where the floating image information is located if the floating image information exists;
the screening unit is used for screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information;
and the image matching unit is used for performing image matching by using the ith image block information and the jth image block information.
In an embodiment, the image matching module further comprises an adjustment unit;
the detection unit is used for detecting whether the image block position is positioned on a division line of the image block information in the first image information and/or the second image information;
the adjusting unit is configured to, if the image block is located on a dividing line of image block information in the first image information and/or the second image information, adjust the dividing line based on the position of the image block to obtain adjusted first image information and/or second image information;
and the image matching unit is used for performing image matching by using the ith image block information in the adjusted first image information and the jth image block information in the adjusted second image information.
In an embodiment, the filtering unit is further configured to, if the image block information is not located on a dividing line of the image block information in the first image information and/or the second image information, filter an ith image block information not including the floating image information from the first image information and/or filter a jth image block information not including the floating image information from the second image information based on the image block position;
the image matching unit is further configured to perform image matching using the ith image block information and the jth image block information.
In an embodiment, the adjusting unit is further configured to move the dividing line up or down based on the position of the image block, so that the dividing line avoids the floating image information, and at least one of the M pieces of image block information in the adjusted first image information or second image information includes image block information that does not include the floating image information.
Each module in the electronic device and units included in each module in the electronic device in the embodiments of the present invention may be implemented by a processor in the electronic device, or may be implemented by a specific logic circuit; for example, in practical applications, the electronic device may be implemented by a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like located in the electronic device.
Here, it should be noted that: the description of the embodiment of the electronic device is similar to the description of the method, and has the same beneficial effects as the embodiment of the method, and therefore, the description is omitted. For technical details that are not disclosed in the embodiment of the electronic device of the present invention, those skilled in the art should refer to the description of the embodiment of the method of the present invention to understand that, for the sake of brevity, detailed description is not repeated here.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or 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 solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, 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.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. An image processing method, characterized in that the method comprises:
acquiring first image information and second image information, wherein the second image information is partially overlapped with the first image information;
respectively carrying out segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
detecting whether floating image information exists in the first image information and/or the second image information;
if floating image information exists; performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information; the ith image block information is the image block which does not contain the floating image information in the first image information, and/or the jth image block information is the image block which does not contain the floating image information in the second image information; the i, j is a positive integer, and i, j < ═ M;
and if the matching is successful, executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information to obtain a long screenshot image of the electronic equipment.
2. The method of claim 1, further comprising:
if the floating image information does not exist, carrying out image matching by using the Mth image block information in the first image information and the 1 st image block information in the second image information;
the mth image block information in the first image information is the image block information at the bottom of the first image information, and the 1 st image block information in the second image information is the image block information at the top of the second image information.
3. The method according to claim 1, wherein the image matching using the ith image block information in the first image information and the jth image block information in the second image information comprises:
determining the position of an image block in the first image information and/or the image information where the floating image information is located;
screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information;
and performing image matching by using the ith image block information and the jth image block information.
4. The method of claim 3, further comprising:
detecting whether the image block position is on a division line of the image block information in the first image information and/or the second image information;
if the image block is located on a division line of image block information in the first image information and/or the second image information, adjusting the division line based on the position of the image block to obtain adjusted first image information and/or second image information; and performing image matching by using the ith image block information in the adjusted first image information and the jth image block information in the adjusted second image information.
5. The method of claim 4, further comprising:
if the image block is not located on a partition line of image block information in the first image information and/or the second image information, screening ith image block information which does not comprise the floating image information from the first image information and/or screening jth image block information which does not comprise the floating image information from the second image information based on the image block position; and performing image matching by using the ith image block information and the jth image block information.
6. The method of claim 4, wherein the adjusting the partition line based on the image block position comprises:
and shifting up or down the dividing line based on the image block position so that the dividing line avoids the floating image information, and at least one of M pieces of image block information in the adjusted first image information or second image information contains image block information which does not contain the floating image information.
7. An electronic device is characterized by comprising an acquisition module, a segmentation processing module, a detection module, an image matching module and a splicing processing module;
the acquisition module is used for acquiring first image information and second image information, and the second image information is partially overlapped with the first image information;
the segmentation processing module is used for respectively performing segmentation processing on the first image information and the second image information to obtain M pieces of image block information, wherein M is a positive integer greater than 1;
the detection module is used for detecting whether floating image information exists in the first image information and/or the second image information; the image matching module is used for performing image matching by using the ith image block information in the first image information and the jth image block information in the second image information if floating image information exists; the ith image block information is the image block which does not contain the floating image information in the first image information, and/or the jth image block information is the image block which does not contain the floating image information in the second image information; the i, j is a positive integer, and i, j < ═ M;
and the splicing processing module is used for executing splicing processing on the first image information and the second image information based on the ith image block information in the first image information and the jth image block information in the second image information if matching is successful so as to obtain a long screenshot image of the electronic equipment.
8. The electronic device of claim 7,
the image matching module is further configured to perform image matching by using the mth image block information in the first image information and the 1 st image block information in the second image information if the floating image information does not exist;
the mth image block information in the first image information is the image block information at the bottom of the first image information, and the 1 st image block information in the second image information is the image block information at the top of the second image information.
9. The electronic device of claim 7, wherein the image matching module comprises a determination unit, a filtering unit, and an image matching unit;
the determining unit is used for determining the position of an image block in the first image information and/or the image information where the floating image information is located;
the screening unit is used for screening ith image block information which does not comprise the floating image information from the first image information based on the image block positions, and/or screening jth image block information which does not comprise the floating image information from the second image information;
and the image matching unit is used for performing image matching by using the ith image block information and the jth image block information.
10. The electronic device of claim 9, wherein the image matching module further comprises an adjustment unit;
the detection module is further configured to detect whether the image block position is on a partition line of the image block information in the first image information and/or the second image information;
the adjusting unit is configured to, if the image block is located on a dividing line of image block information in the first image information and/or the second image information, adjust the dividing line based on the position of the image block to obtain adjusted first image information and/or second image information;
and the image matching unit is used for performing image matching by using the ith image block information in the adjusted first image information and the jth image block information in the adjusted second image information.
11. The electronic device of claim 10,
the screening unit is further used for screening ith image block information without the floating image information from the first image information and/or jth image block information without the floating image information from the second image information based on the image block positions if the image block positions are not on the dividing line of the image block information in the first image information and/or the second image information;
the image matching unit is further configured to perform image matching using the ith image block information and the jth image block information.
12. The electronic device of claim 10,
the adjusting unit is further configured to move the dividing line up or down based on the image block position, so that the dividing line avoids the floating image information, and at least one of the M pieces of image block information in the adjusted first image information or second image information includes image block information that does not include the floating image information.
CN201610201976.4A 2016-03-31 2016-03-31 Image processing method and electronic equipment Active CN105894453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610201976.4A CN105894453B (en) 2016-03-31 2016-03-31 Image processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610201976.4A CN105894453B (en) 2016-03-31 2016-03-31 Image processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN105894453A CN105894453A (en) 2016-08-24
CN105894453B true CN105894453B (en) 2020-05-26

Family

ID=57012833

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610201976.4A Active CN105894453B (en) 2016-03-31 2016-03-31 Image processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN105894453B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329668A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 A kind of method for realizing long sectional drawing, mobile terminal and computer-readable recording medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795920A (en) * 2014-01-21 2014-05-14 宇龙计算机通信科技(深圳)有限公司 Photo processing method and device
CN104933688A (en) * 2014-03-19 2015-09-23 联想(北京)有限公司 Data processing method and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3782368B2 (en) * 2002-03-29 2006-06-07 株式会社東芝 Object image clipping method and program, and object image clipping device
CN103514581B (en) * 2013-10-23 2017-02-15 小米科技有限责任公司 Screen picture capturing method, device and terminal equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795920A (en) * 2014-01-21 2014-05-14 宇龙计算机通信科技(深圳)有限公司 Photo processing method and device
CN104933688A (en) * 2014-03-19 2015-09-23 联想(北京)有限公司 Data processing method and electronic device

Also Published As

Publication number Publication date
CN105894453A (en) 2016-08-24

Similar Documents

Publication Publication Date Title
CN110933296B (en) Apparatus and method for providing content aware photo filter
KR101725887B1 (en) Method and apparatus for searching contents in touch screen device
RU2648601C2 (en) Method for controlling system bar of user equipment and user equipment thereof
US9626076B2 (en) Display apparatus for displaying images and method thereof
CN105847674B (en) A kind of preview image processing method and mobile terminal based on mobile terminal
US20170109912A1 (en) Creating a composite image from multi-frame raw image data
CN110650241B (en) Method for presenting panoramic photo in mobile terminal and mobile terminal
CN108347559A (en) A kind of image pickup method, terminal and computer readable storage medium
CN106537413B (en) System and method for automatically generating photo summary
CN107613203B (en) Image processing method and mobile terminal
CN103942290B (en) Method and apparatus for providing the image in webpage in the terminal
CN105225212A (en) A kind of image processing method and device
TW201415347A (en) Method for zooming screen and electronic apparatus and computer program product using the same
EP3518522B1 (en) Image capturing method and device
CN108777765B (en) Method and device for acquiring full-definition image and electronic equipment
CN107087106A (en) A kind of image pickup method and terminal
CN104133898A (en) Method and device for playing video in small window in browser
CN111401238A (en) Method and device for detecting character close-up segments in video
EP2712176B1 (en) Method and apparatus for photography
CN106775351B (en) Information processing method and device and electronic equipment
EP2871826B1 (en) Method, device and terminal for adjusting widget
CN106097398B (en) A kind of detection method and mobile terminal of Moving Objects
CN106357978B (en) Image output method, device and terminal
WO2015196681A1 (en) Picture processing method and electronic device
CN105894453B (en) Image processing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant