CN110956586B - Picture splicing processing method and device, terminal equipment and storage medium - Google Patents

Picture splicing processing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN110956586B
CN110956586B CN201911302389.4A CN201911302389A CN110956586B CN 110956586 B CN110956586 B CN 110956586B CN 201911302389 A CN201911302389 A CN 201911302389A CN 110956586 B CN110956586 B CN 110956586B
Authority
CN
China
Prior art keywords
picture
pixel
extension area
edge
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.)
Active
Application number
CN201911302389.4A
Other languages
Chinese (zh)
Other versions
CN110956586A (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201911302389.4A priority Critical patent/CN110956586B/en
Publication of CN110956586A publication Critical patent/CN110956586A/en
Application granted granted Critical
Publication of CN110956586B publication Critical patent/CN110956586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The application provides a picture splicing processing method, a device, terminal equipment and a storage medium, wherein the method comprises the following steps: acquiring a first picture to be displayed, and generating a first pixel extension area at the edge of the first picture; determining a second position according to the first position of the first picture and the original size of the first picture, wherein the second position is the position of a second picture to be displayed, which is adjacent to the first picture; and displaying the first picture and the second picture at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced. By the method, when the first picture and the second picture are displayed, whether errors occur in calculation of the first position and the second position or not can be kept, the first pixel extension area and the second picture can be overlapped or spliced, gaps can not occur, the phenomenon that gaps occur between the pictures due to errors in calculation accuracy of floating point numbers is avoided, and the picture display effect is improved.

Description

Picture splicing processing method and device, terminal equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for processing image stitching, a terminal device, and a storage medium.
Background
Picture movement is common in games, such as running games, where the visual effect of a character in progress is achieved by scrolling a background picture. Picture movement generally refers to multiple pictures moving in the same direction and at the same speed.
In an actual application scene, in order to realize a smoother and slower moving effect, a picture is usually moved according to floating point numbers when moving, and when the position of the picture is calculated, the calculating precision of the floating point numbers is inevitably error, so that gaps appear between adjacent pictures, and the display effect of the picture is affected.
Disclosure of Invention
The application provides a picture splicing processing method, a picture splicing processing device, terminal equipment and a storage medium, which are used for solving the technical problems that gaps appear between adjacent pictures and the picture display effect is poor due to errors in floating point number calculation precision in the related technology.
In one aspect, an embodiment of the present application provides a method for processing image stitching, including:
acquiring a first picture to be displayed, and generating a first pixel extension area at the edge of the first picture;
determining a second position according to the first position of the first picture and the original size of the first picture, wherein the second position is the position of a second picture to be displayed, which is adjacent to the first picture;
And displaying the first picture and the second picture at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
According to the picture splicing processing method, a first picture to be displayed is obtained, a first pixel extension area is generated at the edge of the first picture, a second position is determined according to the first position of the first picture and the original size of the first picture, the second position is the position of a second picture to be displayed, which is adjacent to the first picture, and the first picture and the second picture are displayed at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced. Therefore, the pixel extension area is generated at the edge of the first picture, so that when the first picture and the second picture are displayed, no matter whether errors occur in calculation of the first position and the second position, the first pixel extension area and the second picture can be overlapped or spliced, gaps can not occur, the phenomenon that gaps occur between the pictures due to errors in calculation accuracy of floating point numbers is avoided, and the picture display effect is improved.
As another alternative implementation of an embodiment of an aspect of the application,
The generating a first pixel extension area at the edge of the first picture includes:
obtaining a target pixel value corresponding to a target edge on the first picture, wherein the target edge at least comprises an edge adjacent to the second picture;
and carrying out pixel extension on the target edge according to the preset extension pixel length and the target pixel value, and generating a first pixel extension area.
As another alternative implementation of an embodiment of an aspect of the application,
before the displaying the first picture and the second picture at the first position and the second position, respectively, further comprises:
acquiring the second picture;
and generating a second pixel extension area at the edge of the second picture according to the preset extension pixel length, so that the first pixel extension area and the second pixel extension area overlap or are spliced when the first picture and the second picture are displayed at the first position and the second position respectively.
As another optional implementation manner of the embodiment of the aspect of the present application, the determining the second position according to the first position of the first picture and the original size of the first picture includes:
And carrying out summation operation on the first position of the first picture, the original size of the first picture and the extended pixel length to determine the second position.
As another optional implementation manner of an embodiment of an aspect of the present application, the method further includes:
updating the first position of the first picture according to the operation of the user, and determining the updated second position according to the updated first position and the original size of the first picture;
and displaying the first picture and the second picture at the updated first position and the updated second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
As another optional implementation manner of an embodiment of an aspect of the present application, the method further includes:
generating a first pixel extension area at the edge of a third picture arranged at the tail part in the currently displayed picture;
determining a target position adjacent to the third picture according to the third position of the third picture and the original size of the third picture;
and displaying a fourth picture at the target position, wherein the fourth picture is a picture which is arranged at the head part in the currently displayed pictures, and the first pixel extension area of the third picture is overlapped or spliced with the fourth picture.
Another embodiment of the present application provides a device for processing image stitching, including:
the first generation module is used for acquiring a first picture to be displayed and generating a first pixel extension area at the edge of the first picture;
the determining module is used for determining a second position according to the first position of the first picture and the original size of the first picture, wherein the second position is the position of a second picture to be displayed, which is adjacent to the first picture;
and the display module is used for displaying the first picture and the second picture at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
According to the picture splicing processing device, a first pixel extension area is generated at the edge of a first picture by acquiring the first picture to be displayed, a second position is determined according to the first position of the first picture and the original size of the first picture, the second position is the position of a second picture to be displayed, which is adjacent to the first picture, and the first picture and the second picture are displayed at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced. Therefore, the pixel extension area is generated at the edge of the first picture, so that when the first picture and the second picture are displayed, no matter whether errors occur in calculation of the first position and the second position, the first pixel extension area and the second picture can be overlapped or spliced, gaps can not occur, the phenomenon that gaps occur between the pictures due to errors in calculation accuracy of floating point numbers is avoided, and the picture display effect is improved.
As another optional implementation manner of the embodiment of the other aspect of the present application, the first generating module is specifically configured to:
obtaining a target pixel value corresponding to a target edge on the first picture, wherein the target edge at least comprises an edge adjacent to the second picture;
and carrying out pixel extension on the target edge according to the preset extension pixel length and the target pixel value, and generating a first pixel extension area.
As another alternative implementation manner of the embodiment of another aspect of the present application, the apparatus further includes:
the acquisition module is used for acquiring the second picture;
and the second generation module is used for generating a second pixel extension area at the edge of the second picture according to the preset extension pixel length so that the first pixel extension area and the second pixel extension area overlap or are spliced when the first picture and the second picture are displayed at the first position and the second position respectively.
As another optional implementation manner of the embodiment of the other aspect of the present application, the determining module is specifically configured to:
and carrying out summation operation on the first position of the first picture, the original size of the first picture and the extended pixel length to determine the second position.
As another alternative implementation manner of the embodiment of another aspect of the present application, the apparatus further includes:
the position updating module is used for updating the first position of the first picture according to the operation of a user and determining the updated second position according to the updated first position and the original size of the first picture;
the display module is further configured to:
and displaying the first picture and the second picture at the updated first position and the updated second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
As another optional implementation manner of the embodiment of another aspect of the present application, the first generating module is further configured to:
generating a first pixel extension area at the edge of a third picture arranged at the tail part in the currently displayed picture;
the determining module is further configured to:
determining a target position adjacent to the third picture according to the third position of the third picture and the original size of the third picture;
the display module is further configured to: and displaying a fourth picture at the target position, wherein the fourth picture is a picture which is arranged at the head part in the currently displayed pictures, and the first pixel extension area of the third picture is overlapped or spliced with the fourth picture.
In another aspect, an embodiment of the present application provides a terminal device, including a processor and a memory;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the picture stitching processing method according to the above embodiment.
Another aspect of the present application provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the picture stitching method according to the above embodiments.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 (a) is a schematic diagram showing the display effect of adjacent pictures under the normal moving condition in the prior art;
FIG. 1 (b) is a diagram showing an example of the display effect of adjacent pictures in the case of errors in floating point number calculation in the prior art;
fig. 2 is a flowchart of a picture stitching method according to an embodiment of the present application;
Fig. 3 (a) is an exemplary diagram illustrating an effect of overlapping a first pixel extension area of a first picture and a second picture in an embodiment of the present application;
fig. 3 (b) is an exemplary diagram showing the effect of stitching a first pixel extension area of a first picture and a second picture according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a picture stitching method according to another embodiment of the present application;
FIG. 5 (a) is a diagram illustrating pixel extension of a target edge of a first picture according to an embodiment of the present application;
FIG. 5 (b) is a second exemplary diagram of pixel extension of a target edge of a first picture according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a picture stitching method according to another embodiment of the present application;
fig. 7 (a) is an exemplary diagram of pixel extension performed at a splicing position of adjacent pictures of a first picture and a second picture according to a preset extension pixel length in an embodiment of the present application;
fig. 7 (b) is an exemplary diagram of pixel extension performed on four edges of a first picture and a second picture according to a preset extension pixel length in an embodiment of the present application;
fig. 8 (a) is a diagram showing an example of the effect of overlapping the first pixel extension area and the second pixel extension area in the embodiment of the application;
fig. 8 (b) is an exemplary diagram showing the effect of stitching the first pixel extension area and the second pixel extension area according to an embodiment of the present application;
Fig. 9 is a flowchart of a picture stitching method according to still another embodiment of the present application;
fig. 10 is a flowchart of a picture stitching method according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a picture stitching device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a picture stitching device according to another embodiment of the present application;
fig. 13 is a schematic structural diagram of a picture stitching device according to another embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
The picture splicing processing method, the device, the terminal equipment and the storage medium according to the embodiment of the application are described below with reference to the accompanying drawings.
In an application scene of moving picture positions of games and the like, the picture positions are updated by floating point numbers so as to realize a smoother and more accurate moving effect. However, since the calculation accuracy of the floating point number is inevitably error, the calculation of the picture position is error when the picture position moves, so that a gap is formed between the updated picture position and the previous picture. For example, assuming that two pictures a and B of the same size are displayed, the picture position of the picture a is 10.1 and the width is 5, if the picture B is to be displayed adjacently to the picture position of the picture a, the picture position of the picture B is normally: 10.1+5=15.1, then picture B is in close proximity to picture a, and the display effect is as shown in fig. 1 (a). However, if an error occurs in the calculation of the floating point number, the calculated picture position of the picture B may be 15.1000001, so that a gap occurs between the picture B and the picture a, and the display effect is as shown in fig. 1 (B).
Aiming at the problem that a gap exists after the picture moves, the following two schemes are adopted in the related art to solve the problem:
(1) Based on the engine, the gap problem existing when the picture moves is solved by calling an application program interface (Application Program Interface, API). For example, in cocos2d-x, the slot problem can be solved by calling the API interface [ CCSprite.texture setAlias TexPorameters ]. However, this scheme depends on a specific engine, and is not suitable for practical application scenarios.
(2) According to the integer moving picture, the unit for controlling the picture movement is of the int type (namely the integer type), so that errors can not be generated in the position calculation process of the picture movement, and the aim of avoiding gaps between pictures caused by the errors is fulfilled. However, this solution does not achieve a slow movement effect and is poorly flexible.
Aiming at the problems in the prior art, the application discloses a picture splicing processing method, a device, a terminal device and a storage medium, wherein a first pixel extension area is generated at the edge of a first picture, so that the first pixel extension area of the first picture is overlapped or spliced with a second picture without gaps, the phenomenon of gaps between pictures caused by errors of floating point calculation precision is avoided, the picture display effect is improved, and the technical problems of gaps between adjacent pictures and poor picture display effect caused by errors of floating point calculation precision in the related art are solved. In addition, the method provided by the application does not need to depend on a specific engine, has strong applicability, still adopts floating point numbers to move, can realize smooth movement effect and has good flexibility.
The picture splicing processing method provided by the embodiment of the application can be executed by the picture splicing processing device provided by the application, and the device can be configured in the terminal equipment so as to improve the display effect when the picture moves. The terminal equipment can be electronic equipment such as a smart phone, a tablet personal computer and the like.
Fig. 2 is a flowchart illustrating a picture stitching method according to an embodiment of the present application.
As shown in fig. 2, the picture stitching method may include the following steps:
step 101, a first picture to be displayed is obtained, and a first pixel extension area is generated at the edge of the first picture.
In practical applications, a scene where multiple pictures move simultaneously is usually encountered, for example, in a game, a game background picture is obtained by splicing multiple pictures, and when the game runs, the multiple pictures move simultaneously at the same speed and direction, so as to achieve the effect that a character in the game moves.
In this embodiment, the obtained first picture may be any one of a plurality of pictures to be displayed, for example, the obtained first picture is a first picture of a plurality of pictures included in a certain game scene. For the acquired first picture, a first pixel extension area may be generated at the first picture edge.
In order not to affect the display effect of the picture, when the first pixel extension area is generated, the pixel value of each pixel in the first pixel extension area may be determined according to the pixel value at each edge of the first picture. That is, the pixel values of the respective corresponding pixels in the first pixel extension area may be determined by copying the pixel values of the respective pixels in the respective edges of the first picture.
It should be noted that, each corresponding pixel refers to a pixel in the same row or column as an edge pixel of the first picture in the first pixel extension area.
Step 102, determining a second position according to the first position of the first picture and the original size of the first picture, wherein the second position is the position of the second picture to be displayed adjacent to the first picture.
The first position of the first picture may be determined according to an original size of the first picture and a position of a (0, 0) point of a display screen displaying the first picture, or may be determined according to a picture position and a picture size of an adjacent picture displayed in front of the first picture in the display screen, and a specific determining manner may be determined according to a display order of the first picture, which is not limited in the present application.
Typically, the anchor point of the picture is arranged in the center of the picture, and the position of the picture on the display screen is represented by the position of the anchor point on the display screen. Of course, other positions of the picture, such as the upper left corner of the picture, may be used as the anchor point of the picture. In the embodiment of the present application, the anchor point of the picture is set in the center of the picture as an example, and the present application is not limited thereto. The different ways of determining the first position of the first picture are illustrated below with the center of the picture as anchor point.
As an example, if the first picture is a first picture of the plurality of pictures to be displayed, and there is no adjacent picture before the first picture, the first position of the first picture may be determined according to the size of the display screen and the original size of the first picture. For example, assuming that the position of the (0, 0) point of the current display screen is at the upper left corner of the display screen, the original size of the first picture is 100×100, the first position of the first picture may be determined to be (50, 50).
As an example, if the first picture to be displayed is preceded by a neighboring picture, the first position of the first picture is determined according to the picture position and the picture size of the neighboring picture. For example, assuming that the position of the adjacent picture in the display screen is (60, 50), the picture size of the adjacent picture is 100×100, the first picture is on the right side of the adjacent picture, and the sizes of the first picture and the adjacent picture are the same, the first position of the first picture may be determined to be (160,50).
In general, in order to avoid a dislocation phenomenon when two pictures are spliced, and to facilitate design and developer work, two adjacent pictures are usually designed to have the same size. In this embodiment, the first picture and the second picture have the same size.
For a known picture, the size is also known, so in this embodiment, after the first picture is acquired, the original size of the first picture may be directly acquired. The original size of the first picture may be, for example, 100 (width) x 100 (height). Thus, in this embodiment, according to the first position of the first picture and the original size of the first picture, the second position of the second picture to be displayed adjacent to the first picture can be determined.
As an example, when the display directions of the first picture and the second picture are landscape display and the first picture is displayed on the left side of the second picture and the (0, 0) point of the display screen is in the upper left corner, the second position=the first position+the width of the first picture may be determined.
As an example, when the display directions of the first picture and the second picture are portrait display and the first picture is displayed on the upper side of the second picture and the (0, 0) point of the display screen is in the upper left corner, the second position=the first position+the height of the first picture may be determined.
And step 103, displaying the first picture and the second picture at a first position and a second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
In this embodiment, after determining the second position of the second picture to be displayed, the first picture may be displayed at the first position, and the second picture may be displayed at the second position, where after displaying the first picture and the second picture, the first pixel extension area of the first picture and the second picture overlap or are spliced. Taking an example of generating a first pixel extension area on an edge of a first picture adjacent to a second picture as an example, fig. 3 (a) is an example of an effect of overlapping the first pixel extension area of the first picture and the second picture in the embodiment of the present application, and fig. 3 (b) is an example of an effect of stitching the first pixel extension area of the first picture and the second picture in the embodiment of the present application. Wherein the hatched area is a first pixel extension area, and in fig. 3 (a), the first pixel extension area is covered by a part of the second picture. As can be seen from fig. 3 (a) and 3 (b), no gap appears between the adjacent first picture and second picture, and the display effect is improved.
It can be appreciated that the moving picture moves at a preset speed and in a preset direction. For a plurality of moving pictures, the positions of the pictures are updated in real time, and the position of the next picture needs to be determined according to the position of the previous picture. In order to ensure that no gap exists between the moving picture and the adjacent previous picture, in the embodiment of the application, a first pixel extension area is generated at the edge of the previous picture (i.e. the first picture), and when the second position of the adjacent picture (i.e. the second picture) is determined, the second position is determined according to the first position and the original size of the previous picture, and the adjacent second picture is displayed at the second position, so that the adjacent second picture overlaps or is spliced with the first pixel extension area of the first picture, and the gap between the two pictures is avoided in the moving process of the pictures.
As an example, when the sizes of the plurality of pictures are the same, for a first picture of the plurality of pictures, the update position thereof may be determined according to the current position and the preset speed, for a second picture, the update position thereof may be determined by summing the update position of the first picture, the size (width or height) of the first picture, and for a third picture, the update position thereof may be calculated by summing the update position of the second picture, the size of the second picture, and so on, the update position of each picture of the plurality of pictures may be determined. And then, moving the plurality of pictures according to the preset speed and the preset direction at the same time according to the update position corresponding to each picture, and moving the plurality of pictures to the corresponding update position, so that the first pixel extension area of the previous picture and the second picture in the two pictures of the adjacent pictures after movement are overlapped or spliced, and the display effects of the overlapping and splicing are respectively shown in fig. 3 (a) and fig. 3 (b).
According to the picture splicing processing method, a first picture to be displayed is obtained, a first pixel extension area is generated at the edge of the first picture, a second position is determined according to the first position of the first picture and the original size of the first picture, the second position is the position of a second picture to be displayed, which is adjacent to the first picture, and the first picture and the second picture are displayed at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced. Therefore, the pixel extension area is generated at the edge of the first picture, so that when the first picture and the second picture are displayed, no matter whether errors occur in calculation of the first position and the second position, the first pixel extension area and the second picture can be overlapped or spliced, gaps can not occur, the phenomenon that gaps occur between the pictures due to errors in calculation accuracy of floating point numbers is avoided, and the picture display effect is improved.
For two adjacent pictures A and B, if the picture B moves towards the picture A, then the picture A is displayed first and then the picture B is displayed when the picture is displayed, and based on the characteristic that the display level of the picture displayed later is better than that of the picture displayed earlier, the display level of the picture B is better than that of the picture A, and if an overlapping area exists between the picture B and the picture A, the content of the picture A is covered for the picture B of the overlapping part. Based on this, in the embodiment of the present application, the first pixel extension area may be generated only outside the edge of the picture a. When a plurality of pictures are displayed simultaneously, for any two adjacent pictures, the first pixel extension area may be generated only at the edge of the previously displayed picture. In the embodiment of the present application, the first pixel extension area may be obtained by performing pixel extension according to pixels at the edge of the first picture, which is described in detail below with reference to fig. 4.
Fig. 4 is a flowchart illustrating a picture stitching method according to another embodiment of the present application. As shown in fig. 4, step 101 may include the following steps, based on the embodiment shown in fig. 2:
step 201, obtaining a target pixel value corresponding to a target edge on a first picture, wherein the target edge at least includes an edge adjacent to a second picture.
In the embodiment of the application, the target edge at least comprises an edge adjacent to the second picture, and the target edge can be determined according to the relative positions of the first picture and the second picture.
For example, assuming that the first picture is located on the left side of the second picture, the right edge of the first picture is adjacent to the left edge of the second picture, the target edge may include the right edge of the first picture, and may include at least one of the left edge, the upper edge, and the lower edge of the first picture in addition to the right edge.
For another example, assuming that the first picture is located above the second picture, the lower side edge of the first picture is adjacent to the upper side edge of the second picture, the target edge may include the lower side edge of the first picture, and may include at least one of the left side edge, the right side edge, and the upper side edge of the first picture in addition to the lower side edge.
In this embodiment, after the target edge of the first picture is determined, the target pixel value corresponding to the target edge may be obtained.
For example, assuming that the target edge of the first picture is determined to be the right edge, a pixel value corresponding to a column of pixels on the right edge may be acquired as the target pixel value.
For another example, assuming that the target edge of the first picture is determined to be four edges, the pixel value of each pixel on the four edges may be acquired as the target pixel value.
Step 202, performing pixel extension on the target edge according to a preset extension pixel length and a target pixel value, and generating a first pixel extension area.
In the embodiment of the present application, the extension pixel length may be preset, for example, the extension pixel length is set to 1 pixel, 2 pixels, and the like, and the first pixel extension area may be generated according to the preset extension pixel length.
In this embodiment, after determining the target edge and the target pixel value, pixel extension may be performed on the target edge according to the preset extension pixel length and the target pixel value, so as to generate the first pixel extension area.
As an example, assuming that the target edge is the right edge of the first picture, determining the pixel value of each pixel on the right edge as the target pixel value, and performing pixel extension on the target edge according to the target pixel value and the preset extension pixel length to obtain a first pixel extension area. Fig. 5 (a) is a schematic diagram illustrating pixel extension of a target edge of a first picture according to an embodiment of the present application. In fig. 5 (a), each square indicates one pixel, and the pixel in the rightmost column is the target pixel, where C indicates one target pixel, and the pixel value corresponding to each target pixel is the target pixel value. Assuming that the preset extension pixel length is 1, pixel extension is performed on the target edge (i.e., the right edge), as shown in fig. 5 (a), a first pixel extension area with a pixel width is added outside the right edge of the picture (as shown by a dotted line portion in fig. 5 (a)), and for the first pixel extension area, the pixel value of each pixel in the first pixel extension area is determined according to the pixel value of the corresponding pixel on the right edge, for example, for the pixel C1 in the first pixel extension area, which corresponds to the target pixel C, the pixel value of C1 is the same as the pixel value of the target pixel C.
As an example, assuming that the target edge is four edges of the first picture, determining a pixel value of each pixel on each edge of the upper, lower, left and right sides of the first picture as a target pixel value, and performing pixel extension on the target edge according to the target pixel value and a preset extension pixel length to obtain a first pixel extension region. Fig. 5 (b) is a schematic diagram of pixel extension of a target edge of a first picture according to an embodiment of the present application, where each square represents a pixel, and each letter with a reference numeral 1 represents an edge pixel of the picture in fig. 5 (b). Assuming that the preset extension pixel length is 2, the picture is a rectangular picture, pixel extension is performed on four edges of the picture, as shown in fig. 5 (b), two pixel extension areas with pixel widths are added outside the four edges of the picture (as shown by a dotted line portion in fig. 5 (b)), and for the pixel extension area corresponding to the right edge, the pixel value of each pixel in the pixel extension area is determined according to the pixel value of each pixel on the right edge, for example, for pixels A2 and A3 in the pixel extension area, the pixel value is the same as the pixel value of the edge pixel A1, and the pixels A2 and A3 are pixels corresponding to the edge pixel A1 in the pixel extension area. The pixel values of the pixels in the other pixel extension areas may also be generated in the same manner. For example, for a pixel extension area corresponding to the upper edge of the picture, the pixel value of each pixel in the pixel extension area is determined according to the pixel value of each pixel on the upper edge, for example, for pixels B2 and B3 in the pixel extension area, the pixel value is the same as the pixel value of the edge pixel B1 of the picture, and the pixels B2 and B3 are pixels corresponding to the edge pixel B1 in the pixel extension area.
According to the image splicing processing method, the target pixel value corresponding to the target edge on the first image is obtained, the target edge at least comprises the edge adjacent to the second image, the target edge is subjected to pixel extension according to the preset extension pixel length and the target pixel value, a first pixel extension area is generated, the pixel extension of the target edge on the first image is realized, the pixel extension is carried out according to the target pixel value of the target edge, the image display effect of the image is not affected no matter whether the adjacent images are overlapped or spliced during the image display, and therefore the problem of gaps is solved, and meanwhile the display effect is not affected.
In the embodiment of the application, besides pixel extension of the first picture, pixel extension of the second picture adjacent to the first picture can be performed, wherein when pixel extension is performed on the first picture and the second picture, pixel extension is performed according to a preset extension pixel length. The details are described below with reference to fig. 6.
Fig. 6 is a flowchart of a picture stitching method according to another embodiment of the present application. As shown in fig. 6, the picture stitching method may include the following steps:
Step 301, obtaining a first picture to be displayed, and generating a first pixel extension area at the edge of the first picture according to a preset extension pixel length.
Step 302, a summation operation is performed on the first position of the first picture, the original size of the first picture, and the extended pixel length to determine the second position.
As an example, when the display directions of the first picture and the second picture are landscape display and the first picture is displayed on the left side of the second picture and the (0, 0) point of the display screen is in the upper left corner, the second position=the first position+the width of the first picture+the extended pixel length may be determined.
As an example, when the display directions of the first picture and the second picture are portrait display and the first picture is displayed on the upper side of the second picture and the (0, 0) point of the display screen is in the upper left corner, the second position=the first position+the height of the first picture+the extended pixel length may be determined.
Step 303, obtaining a second picture.
And step 304, generating a second pixel extension area at the edge of the second picture according to the preset extension pixel length.
The preset extension pixel length is the same as the extension pixel length when the first pixel extension area is generated, that is, the length of the generated second pixel extension area is equal to the length of the generated first pixel extension area.
In the embodiment of the present application, according to the preset extension pixel length, when the second pixel extension area is generated at the edge of the second picture, the same manner as that for generating the first pixel extension area may be adopted. For example, a target pixel value corresponding to a target edge of the second picture may be obtained, and pixel extension is performed on the target edge according to the target pixel value to obtain a second pixel extension area. Wherein the target edge comprises at least an edge adjacent to the first picture.
The following describes in detail an example of generating a corresponding first pixel extension area and a corresponding second pixel extension area by respectively performing pixel extension at adjacent picture splicing positions of the first picture and the second picture according to a preset extension pixel length.
It should be understood that the adjacent picture stitching position refers to a position adjacent to any two adjacent pictures when stitching. For example, for a plurality of pictures, the pictures a, B, C and D are adjacent in sequence, the right edge of the picture a and the left edge of the picture B are the splicing positions of the adjacent pictures a and B, the right edge of the picture B and the left edge of the picture C are the splicing positions of the adjacent pictures B and C, the right edge of the picture C and the left edge of the picture D are the splicing positions of the adjacent pictures C and D, and when the plurality of pictures are rolled circularly, the picture a needs to be spliced after the picture D, the right edge of the picture D and the left edge of the picture a are the splicing positions of the adjacent pictures D and a.
When the pixel extension areas are generated at adjacent picture splicing positions of any two adjacent pictures, the pixel extension areas corresponding to the two adjacent pictures can be respectively called a first pixel extension area and a second pixel extension area. For example, for adjacent picture a and picture B, the pixel extension area generated at the right edge of picture a may be referred to as a first pixel extension area, and the corresponding pixel extension area generated at the left edge of picture B may be referred to as a second pixel extension area. Of course, the generated pixel extension area corresponding to the right edge of the picture a may be referred to as a second pixel extension area, and the pixel extension area corresponding to the left edge of the picture B may be referred to as a first pixel extension area, which is not limited in the present application.
Fig. 7 (a) is an exemplary diagram of pixel extension performed at a splicing position of adjacent pictures of a first picture and a second picture according to a preset extension pixel length in an embodiment of the present application. As shown in fig. 7 (a), when the right edge of the first picture and the left edge of the second picture are adjacent picture splicing positions, pixel extension is performed on the right edge of the first picture to generate a first pixel extension area, and pixel extension is performed on the left edge of the second picture to generate a second pixel extension area, where the first pixel extension area and the second pixel extension area are shown as shadow areas in fig. 7 (a).
By only carrying out pixel extension at the adjacent picture splicing position of the first picture and the second picture, the method is not only beneficial to overlapping or splicing between the first pixel extension area and the second pixel extension area when the first picture and the second picture are displayed, but also does not influence the display effect of the picture, thereby solving the problem of gaps, ensuring that the display effect is not influenced, reducing the data processing capacity of pixel extension and reducing the processing load.
Fig. 7 (b) is an exemplary diagram of pixel extension performed on four edges of a first picture and a second picture according to a preset extension pixel length in an embodiment of the present application. As shown in fig. 7 (b), pixel extension is performed on four edges of the first picture to generate a first pixel extension area, and pixel extension is performed on four edges of the second picture to generate a second pixel extension area, where the manner in which the first pixel extension area and the second pixel extension area are generated may be referred to in the foregoing embodiment and the description related to fig. 5 (b) is omitted here.
It should be noted that, in this embodiment, the steps 301 to 302 and the steps 303 to 304 may be executed sequentially or simultaneously, and the present application is only illustrated by taking the steps 303 to 304 executed after the steps 301 to 302 as an example, and the present application is not limited thereto.
And step 305, displaying the first picture and the second picture at the first position and the second position respectively, wherein the first pixel extension area and the second pixel extension area overlap or are spliced.
In this embodiment, after the second position is determined, the first picture may be displayed at the first position, and the second picture may be displayed at the second position, where after the first picture and the second picture are displayed, the first pixel extension area of the first picture and the second pixel extension area of the second picture overlap (when no calculation error occurs) or are spliced (when a calculation error occurs). Taking pixel extension at each edge of the first picture and the second picture as an example, fig. 8 (a) is an exemplary diagram of an effect of overlapping the first pixel extension area and the second pixel extension area in the embodiment of the present application, and fig. 8 (b) is an exemplary diagram of an effect of splicing the first pixel extension area and the second pixel extension area in the embodiment of the present application. The shadow areas of the four edges on the first picture are first pixel extension areas, and the shadow areas of the four edges on the second picture are second pixel extension areas. As can be seen from fig. 8 (a) and 8 (b), no gap appears between the adjacent first picture and second picture, and the display effect is improved.
According to the picture splicing processing method, a first pixel extension area is generated at the edge of a first picture according to the preset extension pixel length, a second pixel extension area is generated at the edge of a second picture, summation operation is carried out on the first position of the first picture, the original size of the first picture and the extension pixel length, the second position is determined, the first picture and the second picture are displayed at the first position and the second position respectively, and the first pixel extension area and the second pixel extension area are overlapped or spliced, so that gaps between the first picture and the second picture cannot occur due to calculation errors, and the display effect of the picture is improved.
In some game scenes, a game background picture is usually obtained by splicing a plurality of pictures, and when a game runs, the plurality of pictures move at the same speed and direction simultaneously so as to achieve the effect that a character in the game moves under the control of a user. That is, in some scenes, the pictures that are stitched to each other are moving, and the positions of the pictures are changing in real time. Thus, in one possible implementation manner of the embodiment of the present application, the position of the picture may be updated according to the operation of the user.
Fig. 9 is a flowchart of a picture stitching method according to still another embodiment of the present application. As shown in fig. 9, on the basis of the foregoing embodiment, the picture stitching method of the present application may further include the following steps:
step 401, updating a first position of the first picture according to the operation of the user, and determining an updated second position according to the updated first position and the original size of the first picture.
The user operation may be, for example, a left-shift, a right-shift, an up-shift, a down-shift, a jump, or the like.
In this embodiment, according to the operation of the user, the first position of the first picture may be updated. For example, when the user's operation is a right-shift operation, if a right-shift of the character is to be achieved, the first picture as the background picture needs to be relatively shifted to the left, and if the upper left corner of the display screen is the (0, 0) point, in the first position of the first picture, the abscissa thereof gradually decreases with the user's operation, and the decrease amount of the abscissa may be determined according to the preset moving speed of the first picture. By gradually reducing the abscissa in the first position, the first position is updated in real time, so that the first picture gradually moves leftwards, and the aim of moving the character rightwards along with the right-moving operation of the user is fulfilled.
Then, after the updated first position is determined according to the operation of the user, the updated second position may be further determined according to the updated first position and the original size of the first picture.
As an example, when the first picture moves to the left, the (0, 0) point of the display screen is in the upper left corner, the updated second position = updated first position + width of the first picture may be determined.
It can be appreciated that when the first picture and the second picture are both pixel-extended, the updated second position may be determined according to the updated first position, the original size of the first picture, and the preset extended pixel length.
And step 402, displaying the first picture and the second picture at the updated first position and the updated second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
In this embodiment, after the updated first position and the updated second position are determined, the first picture may be displayed at the updated first position, and the second picture may be displayed at the updated second position, so as to realize movement of the character along with the operation of the user in visual effect.
According to the picture splicing processing method, the first position of the first picture is updated according to the operation of the user, the updated second position is determined according to the updated first position and the original size of the first picture, the first picture and the second picture are respectively displayed at the updated first position and the updated second position, and the first pixel extension area and the second picture are overlapped or spliced, so that no gaps are formed between the first picture and the second picture no matter whether calculation errors occur in a scene with the picture positions being changed continuously, and the display effect is improved.
When a plurality of pictures alternately move to achieve the rolling effect, the pictures arranged at the head part in the plurality of pictures need to be moved to the last and spliced with the pictures at the tail part, and gaps are not formed between the spliced pictures. Thus, in one possible implementation manner of the embodiment of the present application, as shown in fig. 10, on the basis of the foregoing embodiment, the picture stitching method of the present application may further include the following steps:
in step 501, a first pixel extension area is generated at the edge of a third picture arranged at the tail in the currently displayed picture.
As an example, it may be detected in real time whether a picture currently arranged at the head has been completely moved out of the screen range among the plurality of pictures currently displayed, and if so, a first pixel extension area is generated at the edge of a third picture arranged at the tail among the pictures currently displayed.
For the manner of generating the first pixel extension area at the third picture edge, refer to the process of generating the first pixel extension area at the first picture edge in the foregoing embodiment, which is not described herein again.
Step 502, determining a target position adjacent to the third picture according to the third position of the third picture and the original size of the third picture.
It should be noted that, the manner of determining the target position may refer to the manner of determining the second position in the foregoing embodiment.
As an example, when a picture is displayed horizontally, the target position=the third position+the original size of the third picture.
When pixel extension is performed on both of the two spliced pictures, the extension pixel length needs to be considered when determining the target position, that is, the target position=the third position+the original size of the third picture+the extension pixel length.
In step 503, a fourth picture is displayed at the target position, where the fourth picture is a picture arranged at the head of the currently displayed pictures, and the first pixel extension area of the third picture overlaps or is spliced with the fourth picture.
In this embodiment, among currently displayed pictures, a picture arranged at the tail may be referred to as a third picture, a picture arranged at the head may be referred to as a fourth picture, after determining a target position, the fourth picture is displayed at the target position, and after displaying, a first pixel extension area of the third picture and the fourth picture overlap or are spliced.
According to the picture splicing processing method, the first pixel extension area is generated at the edge of the third picture arranged at the tail part in the currently displayed picture, the target position adjacent to the third picture is determined according to the third position of the third picture and the original size of the third picture, and then the fourth picture is displayed at the target position, wherein the fourth picture is the picture arranged at the head part in the currently displayed picture, the first pixel extension area of the third picture and the fourth picture are overlapped or spliced, rolling display of the pictures is achieved, and gaps are not formed between the third picture and the fourth picture after the third picture and the fourth picture are spliced through pixel extension of the third picture, so that the display effect of the pictures is improved.
In the foregoing embodiments, two adjacent pictures are the same in size, which is taken as an example, however, for the case where two adjacent pictures are different in size, a similar scheme may be adopted to solve the technical problem that a gap occurs between the pictures due to a calculation error, and the difference is only that the determination modes of the positions are different compared with the case where the two adjacent pictures are the same in size. The following is a detailed description.
As an example, for adjacent first and second pictures, the sizes of the first and second pictures are different, and when pixel extension is performed only on the first picture, the second position of the second picture to be displayed is: first position of first picture + size of first picture/2 + size of second picture/2.
As an example, for adjacent first and second pictures, the sizes of the first and second pictures are different, and when pixel extension is performed on the first and second pictures according to a preset extension pixel length, respectively, the second position of the second picture to be displayed is: first position of first picture + size of first picture/2 + size of second picture/2 + extended pixel length.
The first position is represented in the form of coordinates, for example, the first position may be represented as (50, 60), and when the second position is calculated, the width or the height of the first picture and the second picture may be selected to be substituted into the calculation formula according to the display directions of the first picture and the second picture to determine the second position.
For example, assuming that the first position is (50, 60), pixel extension is performed on the first picture only, and the first picture and the second picture are displayed laterally, the abscissa of the second position=50+the width of the first picture/2+the width of the second picture/2, and the ordinate of the second position is still 60.
In summary, for the adjacent first picture and second picture, whether the sizes of the first picture are the same or not, by performing pixel extension, when the two pictures are displayed, the first pixel extension area of the first picture overlaps or splices with the second picture, or the first pixel extension area of the first picture overlaps or splices with the second pixel extension area of the second picture, so that a gap caused by calculation errors between the first picture and the second picture can be avoided, and the display effect of the pictures is ensured.
In order to achieve the above embodiments, an embodiment of the present application provides a picture stitching device.
Fig. 11 is a schematic structural diagram of a picture stitching device according to an embodiment of the present application.
As shown in fig. 11, the picture mosaic processing device 80 includes: a first generation module 810, a determination module 820, and a display module 830.
The first generating module 810 is configured to obtain a first picture to be displayed, and generate a first pixel extension area at an edge of the first picture.
In one possible implementation manner of the embodiment of the present application, the first generating module 810 is specifically configured to: acquiring a target pixel value corresponding to a target edge on a first picture, wherein the target edge at least comprises an edge adjacent to a second picture; and carrying out pixel extension on the target edge according to the preset extension pixel length and the target pixel value, and generating a first pixel extension area.
The method comprises the steps that through obtaining the target pixel value corresponding to the target edge on the first picture, the target edge at least comprises the edge adjacent to the second picture, pixel extension is carried out on the target edge according to the preset extension pixel length and the target pixel value, a first pixel extension area is generated, pixel extension is carried out on the target edge on the first picture, pixel extension is carried out according to the target pixel value of the target edge, and the method is beneficial to not affecting the display effect of pictures no matter overlapping or splicing between adjacent pictures when the pictures are displayed, so that the problem of gaps is solved, and meanwhile, the display effect is not affected.
The determining module 820 is configured to determine a second position according to the first position of the first picture and the original size of the first picture, where the second position is a position of a second picture to be displayed adjacent to the first picture.
The display module 830 is configured to display the first picture and the second picture at a first position and a second position, respectively, where the first pixel extension area and the second picture overlap or are spliced.
In a possible implementation manner of the embodiment of the present application, as shown in fig. 12, on the basis of the embodiment shown in fig. 11, the image stitching device 80 further includes:
and an obtaining module 840, configured to obtain the second picture.
The second generating module 850 is configured to generate, according to a preset extension pixel length, a second pixel extension area at an edge of the second picture, so that the first pixel extension area and the second pixel extension area overlap or splice when the first picture and the second picture are displayed at the first position and the second position, respectively.
In this embodiment, the determining module 820 is specifically configured to: and carrying out summation operation on the first position of the first picture, the original size of the first picture and the extended pixel length to determine the second position.
By generating the second pixel extension areas at the edges of the adjacent second pictures, when the first pictures and the second pictures are displayed at the first position and the second position respectively, the first pixel extension areas and the second pixel extension areas overlap or are spliced, so that gaps between the first pictures and the second pictures cannot occur due to calculation errors, and the display effect of the pictures is improved.
In a possible implementation manner of the embodiment of the present application, as shown in fig. 13, on the basis of the embodiment shown in fig. 11, the image stitching device 80 further includes:
the location updating module 860 is configured to update a first location of the first picture according to an operation of the user, and determine an updated second location according to the updated first location and an original size of the first picture.
The display module 830 is further configured to: and displaying the first picture and the second picture at the updated first position and the updated second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
Therefore, no matter whether calculation errors occur or not in a scene with continuously changed picture positions, gaps can not occur between the first picture and the second picture, and the display effect is improved.
When a plurality of pictures alternately move to achieve the rolling effect, the pictures arranged at the head part in the plurality of pictures need to be moved to the last and spliced with the pictures at the tail part, and gaps are not formed between the spliced pictures. Thus, in one possible implementation of the embodiment of the present application, the first generating module 810 is further configured to: and generating a first pixel extension area at the edge of a third picture arranged at the tail part in the currently displayed picture. The determining module 820 is further configured to: and determining a target position adjacent to the third picture according to the third position of the third picture and the original size of the third picture. The display module 830 is further configured to: and displaying a fourth picture at the target position, wherein the fourth picture is a picture arranged at the head part in the currently displayed pictures, and the first pixel extension area of the third picture is overlapped or spliced with the fourth picture.
Therefore, rolling display of the pictures is achieved, and through pixel extension of the third picture, gaps can not appear between the third picture and the fourth picture after the third picture and the fourth picture are spliced, and the display effect of the pictures is improved.
It should be noted that the foregoing explanation of the embodiment of the image stitching method is also applicable to the image stitching device of this embodiment, and the implementation principle is similar, which is not repeated here.
According to the picture movement processing device, a first pixel extension area is generated at the edge of a first picture by acquiring the first picture to be displayed, a second position is determined according to the first position of the first picture and the original size of the first picture, the second position is the position of a second picture to be displayed, which is adjacent to the first picture, and the first picture and the second picture are displayed at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced. Therefore, the pixel extension area is generated at the edge of the first picture, so that when the first picture and the second picture are displayed, no matter whether errors occur in calculation of the first position and the second position, the first pixel extension area and the second picture can be overlapped or spliced, gaps can not occur, the phenomenon that gaps occur between the pictures due to errors in calculation accuracy of floating point numbers is avoided, and the picture display effect is improved.
In order to implement the above embodiment, the embodiment of the present application further provides a terminal device, including a processor and a memory. Wherein the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for implementing the picture mosaic processing method as described in the above embodiments.
In order to achieve the above embodiments, the embodiments of the present application also provide a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the picture stitching processing method as described in the above embodiments.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (8)

1. The picture splicing processing method is characterized by comprising the following steps of:
acquiring a first picture to be displayed, and generating a first pixel extension area at the edge of the first picture;
determining a second position according to the first position of the first picture and the original size of the first picture, wherein the second position is the position of a second picture to be displayed, which is adjacent to the first picture;
displaying the first picture and the second picture at the first position and the second position respectively, wherein the first pixel extension area and the second picture overlap or splice;
the generating a first pixel extension area at the edge of the first picture includes:
obtaining a target pixel value corresponding to a target edge on the first picture, wherein the target edge at least comprises an edge adjacent to the second picture, and the target edge is determined by the relative positions of the first picture and the second picture;
According to the preset extension pixel length and the target pixel value, carrying out pixel extension on the target edge to generate a first pixel extension area;
before the displaying the first picture and the second picture at the first position and the second position, respectively, further comprises:
acquiring the second picture;
generating a second pixel extension area at the edge of the second picture according to the preset extension pixel length, so that the first pixel extension area and the second pixel extension area overlap or are spliced when the first picture and the second picture are displayed at the first position and the second position respectively;
the method further comprises the steps of:
generating a first pixel extension area at the edge of a third picture arranged at the tail part in the currently displayed picture;
determining a target position adjacent to the third picture according to the third position of the third picture and the original size of the third picture;
and displaying a fourth picture at the target position, wherein the fourth picture is a picture which is arranged at the head part in the currently displayed pictures, and the first pixel extension area of the third picture is overlapped or spliced with the fourth picture.
2. The method of claim 1, wherein the determining the second position from the first position of the first picture and the original size of the first picture comprises:
and carrying out summation operation on the first position of the first picture, the original size of the first picture and the extended pixel length to determine the second position.
3. The method as recited in claim 1, further comprising:
updating the first position of the first picture according to the operation of the user, and determining the updated second position according to the updated first position and the original size of the first picture;
and displaying the first picture and the second picture at the updated first position and the updated second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
4. A picture mosaic processing device, comprising:
the first generation module is used for acquiring a first picture to be displayed and generating a first pixel extension area at the edge of the first picture;
the determining module is used for determining a second position according to the first position of the first picture and the original size of the first picture, wherein the second position is the position of a second picture to be displayed, which is adjacent to the first picture;
The display module is used for displaying the first picture and the second picture at the first position and the second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced;
the first generating module is specifically configured to:
obtaining a target pixel value corresponding to a target edge on the first picture, wherein the target edge at least comprises an edge adjacent to the second picture;
according to the preset extension pixel length and the target pixel value, carrying out pixel extension on the target edge to generate a first pixel extension area;
the apparatus further comprises:
the acquisition module is used for acquiring the second picture;
the second generation module is used for generating a second pixel extension area at the edge of the second picture according to the preset extension pixel length so that the first pixel extension area and the second pixel extension area overlap or are spliced when the first picture and the second picture are displayed at the first position and the second position respectively;
the apparatus further comprises:
the position updating module is used for updating the first position of the first picture according to the operation of a user and determining the updated second position according to the updated first position and the original size of the first picture;
The display module is further configured to:
and displaying the first picture and the second picture at the updated first position and the updated second position respectively, wherein the first pixel extension area and the second picture are overlapped or spliced.
5. The apparatus of claim 4, wherein the determining module is specifically configured to:
and carrying out summation operation on the first position of the first picture, the original size of the first picture and the extended pixel length to determine the second position.
6. The apparatus of claim 5, wherein,
the first generation module is further configured to:
generating a first pixel extension area at the edge of a third picture arranged at the tail part in the currently displayed picture;
the determining module is further configured to:
determining a target position adjacent to the third picture according to the third position of the third picture and the original size of the third picture;
the display module is further configured to: and displaying a fourth picture at the target position, wherein the fourth picture is a picture which is arranged at the head part in the currently displayed pictures, and the first pixel extension area of the third picture is overlapped or spliced with the fourth picture.
7. A terminal device comprising a processor and a memory;
wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for implementing the picture stitching method as claimed in any one of claims 1-3.
8. A non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor implements the picture stitching method as claimed in any one of claims 1-3.
CN201911302389.4A 2019-12-17 2019-12-17 Picture splicing processing method and device, terminal equipment and storage medium Active CN110956586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911302389.4A CN110956586B (en) 2019-12-17 2019-12-17 Picture splicing processing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911302389.4A CN110956586B (en) 2019-12-17 2019-12-17 Picture splicing processing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110956586A CN110956586A (en) 2020-04-03
CN110956586B true CN110956586B (en) 2023-09-29

Family

ID=69982192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911302389.4A Active CN110956586B (en) 2019-12-17 2019-12-17 Picture splicing processing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110956586B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427504A (en) * 2011-10-08 2012-04-25 广东威创视讯科技股份有限公司 Image processing method, device and system based on background splicing wall
CN103634650A (en) * 2013-11-06 2014-03-12 康佳集团股份有限公司 Intelligent television platform-based picture processing method and intelligent television platform-based picture processing system
CN105205795A (en) * 2014-06-25 2015-12-30 上海照炎信息科技有限公司 Pixel bridging-based three-dimensional panoramic picture splicing method
CN106204442A (en) * 2016-06-29 2016-12-07 北京金山安全软件有限公司 Picture splicing method and device and electronic equipment
WO2017014392A1 (en) * 2015-07-20 2017-01-26 엘지전자(주) Electronic frame and image displaying method of electronic frame
CN108279857A (en) * 2017-12-29 2018-07-13 广东创捷智能科技有限公司 The liquid crystal-spliced screen of zero piece of integrated pixel filling based on HDbaseT signal transmissions
WO2018171429A1 (en) * 2017-03-22 2018-09-27 腾讯科技(深圳)有限公司 Image stitching method, device, terminal, and storage medium
WO2018194599A1 (en) * 2017-04-19 2018-10-25 CapsoVision, Inc. Method of image processing and display for images captured by a capsule camera
WO2019071990A1 (en) * 2017-10-11 2019-04-18 中兴通讯股份有限公司 Image processing method and apparatus
CN109949227A (en) * 2019-03-12 2019-06-28 湖北文理学院 Image split-joint method, system and electronic equipment
CN109992226A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 Image display method and device and spliced display screen

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9042674B2 (en) * 2013-03-15 2015-05-26 Digitalglobe, Inc. Automated geospatial image mosaic generation

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102427504A (en) * 2011-10-08 2012-04-25 广东威创视讯科技股份有限公司 Image processing method, device and system based on background splicing wall
CN103634650A (en) * 2013-11-06 2014-03-12 康佳集团股份有限公司 Intelligent television platform-based picture processing method and intelligent television platform-based picture processing system
CN105205795A (en) * 2014-06-25 2015-12-30 上海照炎信息科技有限公司 Pixel bridging-based three-dimensional panoramic picture splicing method
WO2017014392A1 (en) * 2015-07-20 2017-01-26 엘지전자(주) Electronic frame and image displaying method of electronic frame
CN106204442A (en) * 2016-06-29 2016-12-07 北京金山安全软件有限公司 Picture splicing method and device and electronic equipment
WO2018171429A1 (en) * 2017-03-22 2018-09-27 腾讯科技(深圳)有限公司 Image stitching method, device, terminal, and storage medium
WO2018194599A1 (en) * 2017-04-19 2018-10-25 CapsoVision, Inc. Method of image processing and display for images captured by a capsule camera
WO2019071990A1 (en) * 2017-10-11 2019-04-18 中兴通讯股份有限公司 Image processing method and apparatus
CN108279857A (en) * 2017-12-29 2018-07-13 广东创捷智能科技有限公司 The liquid crystal-spliced screen of zero piece of integrated pixel filling based on HDbaseT signal transmissions
CN109992226A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 Image display method and device and spliced display screen
CN109949227A (en) * 2019-03-12 2019-06-28 湖北文理学院 Image split-joint method, system and electronic equipment

Also Published As

Publication number Publication date
CN110956586A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
CN110969580B (en) Image display method and device
CN107393459B (en) Image display method and device
CN111127543B (en) Image processing method, device, electronic equipment and storage medium
KR20110091700A (en) Method and system for image resizing based on interpolation enhanced seam operations
CN110618803B (en) Image display method and device
CN109300085B (en) Image stitching method and device, electronic equipment and storage medium
US7840070B2 (en) Rendering images based on image segmentation
WO2010021009A1 (en) Image correction device and image correction method
JP2005122361A (en) Image processor, its processing method, computer program, and recording medium
JP2014059691A (en) Image processing device, method and program
CN111437604A (en) Game display control method and device, electronic equipment and storage medium
TW200822719A (en) Image processing device, image processing method, and program
CN110956586B (en) Picture splicing processing method and device, terminal equipment and storage medium
CN111080544A (en) Face distortion correction method and device based on image and electronic equipment
CN112426711B (en) Method, system, electronic device and storage medium for processing Bloom effect
CN111091083B (en) Face scale calculation method and device based on image and electronic equipment
CN107644451B (en) Animation display method and device
US11783527B2 (en) Apparatus and method for generating a light intensity image
CN109391773B (en) Method and device for controlling movement of shooting point during switching of panoramic page
KR101577627B1 (en) Apparatus for playing mixed reality content and method for rendering mixed reality content
JP2008109545A (en) Image blur detecting apparatus, and image blur correcting apparatus with same, solid-state imaging apparatus, and electronic euipment
CN114222074B (en) Spliced screen driving method and device, server and storage medium
CN111063001B (en) Picture synthesis method, device, electronic equipment and storage medium
CN110807733B (en) Splicing compensation method and device and storage medium
CN113965699B (en) Image processing method, device, electronic equipment and 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