CN113870114A - Picture splicing method and device - Google Patents

Picture splicing method and device Download PDF

Info

Publication number
CN113870114A
CN113870114A CN202111187585.9A CN202111187585A CN113870114A CN 113870114 A CN113870114 A CN 113870114A CN 202111187585 A CN202111187585 A CN 202111187585A CN 113870114 A CN113870114 A CN 113870114A
Authority
CN
China
Prior art keywords
picture
spliced
splicing
frame
instruction
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.)
Pending
Application number
CN202111187585.9A
Other languages
Chinese (zh)
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202111187585.9A priority Critical patent/CN113870114A/en
Publication of CN113870114A publication Critical patent/CN113870114A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing

Abstract

The application provides a picture splicing method and a picture splicing device, wherein the picture splicing method comprises the following steps: receiving a picture splicing instruction; responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information; splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame; receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor; and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture. By the method, the problem of picture splicing form solidification is solved, meanwhile, the picture processing instruction of the user is added for interactive adjustment, the final picture splicing effect is achieved according to the instruction of the user, the splicing mode is enriched, and the use experience of the user is improved.

Description

Picture splicing method and device
Technical Field
The application relates to the technical field of internet, in particular to a picture splicing method. The application also relates to a picture splicing device, a computing device and a computer readable storage medium.
Background
Along with the development of the internet technology, the popularity of the intelligent terminal in social life is higher and higher, the number of scenes for splicing pictures by the user is higher and higher, in the multi-picture splicing scene on the current market, a plurality of pictures are usually selected or intercepted, then the pictures are sequentially spliced or overlapped purely according to an algorithm, and finally the spliced pictures are provided for the user, the splicing form is single, the user cannot preview and participate in the splicing process, the spliced pictures can be partially shielded or excessively exposed, the splicing appeal of the user cannot be met, the satisfactory effect of the user cannot be achieved, and the participation sense and visual experience of the user on picture splicing are poor.
Disclosure of Invention
In view of this, the embodiment of the present application provides a picture stitching method. The application also relates to a picture splicing device, a computing device and a computer readable storage medium, which are used for solving the problems that the picture splicing mode is single, the preview capability is not adjusted in real time, and the participation experience of a user on picture splicing is poor in the prior art.
According to a first aspect of an embodiment of the present application, there is provided a picture stitching method, including:
receiving a picture splicing instruction;
responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information;
splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame;
receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor;
and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture.
According to a second aspect of the embodiments of the present application, there is provided a picture stitching apparatus, including:
the first receiving module is configured to receive a picture splicing instruction;
the acquisition module is configured to respond to the picture splicing instruction to acquire a picture set to be spliced and target splicing configuration information;
the splicing module is configured to splice the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information, and splice a picture preview frame;
a second receiving module configured to receive a frame processing instruction for the stitched picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor;
and the processing module is configured to process the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture.
According to a third aspect of embodiments of the present application, there is provided a computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the picture stitching method when executing the computer instructions.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the picture stitching method.
The picture splicing method provided by the application receives a picture splicing instruction; responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information; splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame; receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor; and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture. According to the image splicing method and device, the problem of solidification of the image splicing form is solved, meanwhile, the image processing instruction of the user is added to carry out interaction adjustment, the final image splicing effect is achieved according to the instruction of the user, the splicing mode is enriched, and the use experience of the user is improved.
Drawings
Fig. 1 is a flowchart of a picture stitching method according to an embodiment of the present application;
fig. 2 is a schematic frame diagram of a picture stitching method according to an embodiment of the present application;
fig. 3 is a processing flow chart of a picture stitching method applied to stitching a panoramic picture according to an embodiment of the present application;
FIG. 4 is a schematic diagram of picture stitching provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of a picture stitching apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present application relate are explained.
Pinch gesture: the intelligent terminal pinch gesture is mainly used for zooming in and zooming out operations and needs to be carried out by two fingers at the same time.
The Pan gesture: the dragging gesture of the intelligent terminal is mainly used for long lists or sliding operation beyond a display area and needs to be performed by a single finger.
UICollectionView: the terminal flow layout view component with a Pan gesture can present different list or set layout modes according to different layout configurations.
Lazy loading: when a user scrolls the page, the content in the starting area is loaded preferentially, and the content in other parts enters the visible area and then is loaded, so that the service performance is improved.
In the present multigraph concatenation realization on the market, select and intercept many pictures usually, then splice in proper order or stack in order according to the algorithm, splice or draw on this basis, in the whole concatenation flow, there is not user interaction, unable temporary adjustment, and do not have the ability of preview, direct output gives the final concatenation result of user, concatenation picture at this moment often can't reach the effect that the user is satisfied, for example when concatenation picture subtitle, the position of the subtitle of different video screenshots in the picture is not unified, adopt fixed concatenation mode simply and can't satisfy all picture concatenations, there is the condition that partial subtitle is sheltered from. And the common splicing direction is longitudinal splicing, and for the landscapes of which the actual pictures to be spliced are in different directions, the landscape panorama is more suitable for being spliced transversely, and the function of splicing the panorama cannot be realized in the common splicing direction. In the process of picture splicing, picture contents are different, different users have different requirements on the final splicing effect, the general multi-picture splicing mode is single, the capacity of real-time adjustment and preview is not available, the spliced picture has the condition that partial contents are shielded or contents are too much exposed and the like, the splicing appeal of the users cannot be met, the participation and visual experience of the users in picture splicing are poor, in addition, the picture splicing adopts a traversing calculation mode, adjustment before splicing is needed to be carried out on each picture, the temporary insertion deletion or the adjustment sequence needs to be recalculated and arranged, the processing is complicated, and errors are easy to occur.
Based on this, in the present application, a picture stitching method is provided, and the present application simultaneously relates to a picture stitching apparatus, a computing device, and a computer readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 1 shows a flowchart of a picture stitching method according to an embodiment of the present application, which specifically includes the following steps:
step 102: and receiving a picture splicing instruction.
The terminal is applied to the terminal, the terminal can be specifically a smart phone, a tablet personal computer, an intelligent wearable device and the like, and the terminal has the capability of processing a picture splicing instruction and completing picture splicing. The picture splicing instruction specifically refers to an instruction sent by a user to splice a plurality of pictures to be spliced into one spliced picture.
In a specific embodiment provided by the application, taking a terminal as an example of a smart phone, a user operates the smart phone to send a picture splicing instruction, and the smart phone receives the picture splicing instruction sent by the user.
Step 104: and responding to the image splicing instruction to acquire the image set to be spliced and target splicing configuration information.
In the process of splicing the pictures, a plurality of pictures for picture splicing need to be determined at first, and the plurality of pictures for picture splicing are called as a picture set to be spliced, that is, the pictures in the picture set to be spliced are used for splicing to generate spliced pictures.
The target splicing configuration information is specifically related configuration information used for determining how to splice the pictures to be spliced, such as splicing direction, splicing angle, splicing proportion and other contents, and according to the target splicing configuration information, how to splice the pictures to be spliced can be determined.
Specifically, the acquiring a to-be-spliced picture set in response to the picture splicing instruction includes:
responding to the picture splicing instruction to obtain an initial picture set to be spliced;
and filtering the pictures in the initial picture set to be spliced according to a preset picture checking rule to obtain the picture set to be spliced.
In general, after sending a picture splicing instruction, a user may access an album of a terminal of the user, and it should be noted that the user authorization is obtained by an operation of accessing the album of the terminal of the user in advance through user permission.
The method includes the steps that through accessing an album of a terminal, pictures which a user wants to splice are selected to form an initial picture set to be spliced, the pictures to be spliced in the initial picture set to be spliced are pictures which are not screened, and it needs to be noted that the pictures selected by the user are not uniform in the initial picture set to be spliced due to different shooting devices, different shooting settings, different shooting angles and the like, for example, a picture 1 is shot transversely, a picture 2 is shot longitudinally, a picture 3 is a terminal screenshot, a picture 4 is a shot panoramic image, a picture 5 is a picture with an abnormal aspect ratio obtained after the user cuts out, a picture 6 is a moving picture and the like, and the pictures which are different in types cannot be spliced together effectively, so that the pictures which do not meet the splicing requirements in the initial picture set to be spliced are required to be deleted, filtered and filtered.
Specifically, data type verification needs to be sequentially performed on the pictures to be spliced in the initial picture set to be spliced, and whether the pictures are of a type that can be subjected to picture splicing is determined, for example, when the GIF moving pictures cannot be spliced, the GIF moving pictures in the initial picture set to be spliced need to be deleted. And checking the picture information of the picture to be spliced, and judging whether the picture direction, the filling mode, the aspect ratio and the like of the picture to be spliced are consistent. In addition, the picture resources are required to be processed, and the pictures with the size larger than the preset threshold value are compressed according to the proportion, so that the situation that the picture resources occupy too much memory and influence the subsequent display performance is avoided.
After filtering according to the rules, filtering and deleting the pictures to be spliced which do not meet the requirements in the initial picture set to be spliced, reserving the pictures to be spliced which meet the rules, and obtaining the picture set to be spliced.
The method comprises the steps that a user selects a picture set to be spliced, and also needs to select corresponding splicing configuration information according to actual requirements of the user, and the user determines a final splicing row form, wherein specifically, a picture splicing instruction comprises a splicing configuration identifier;
responding to the image splicing instruction to acquire target splicing configuration information, wherein the target splicing configuration information comprises:
and acquiring target splicing configuration information in a preset configuration information base according to the splicing configuration identifier.
The splicing configuration identifier specifically refers to an identifier for uniquely determining splicing configuration information, and one splicing configuration identifier corresponds to unique splicing configuration information. In practical application, the splicing configuration information can be displayed in the terminal in a visual form, and a user can select splicing configuration information which the user wants from a plurality of splicing configuration information displayed in the terminal in a preview form and can also customize the splicing configuration information in a customized form. And acquiring a corresponding splicing configuration identifier for the selected splicing configuration information, sending the splicing configuration identifier to the terminal, and acquiring corresponding target splicing configuration information in a preset configuration information base by the terminal according to the splicing configuration identifier. For the user-defined splicing configuration information, a new splicing configuration identifier can be created for the user-defined splicing configuration information and stored in a preset configuration information base, so that the user-defined splicing configuration information can be modified or deleted conveniently in the follow-up process.
In a specific embodiment provided by the present application, the above example is continued, 3 to-be-spliced pictures are obtained according to the picture splicing instruction to form a to-be-spliced picture set, and meanwhile, the target splicing configuration information C is obtained in the preset configuration information base according to the splicing configuration identifier in the picture splicing instruction.
Step 106: and splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame.
The spliced picture preview frame is generated after the pictures to be spliced in the picture set to be spliced are spliced and is convenient for a user to browse.
Specifically, splicing the to-be-spliced pictures in the to-be-spliced picture set based on the target splicing configuration information, and splicing a picture preview frame, includes:
analyzing the target splicing configuration information to generate a preview layout frame;
and inputting the pictures to be spliced in the picture set to be spliced into the preview layout frame to generate a spliced picture preview frame.
In practical application, firstly analyzing the target splicing configuration information, and generating a Layout configuration for displaying a preview structure according to the target splicing configuration information, namely previewing a Layout frame, for example, when the target splicing configuration information is transversely spliced, the Layout frame is transversely set; when the target splicing configuration information is longitudinally spliced, previewing the layout frame to be longitudinally arranged; when the target splicing configuration information is stacked, previewing the layout frame to be in a stacked setting; and under the condition that the target splicing configuration information is arc splicing, the preview layout frame is arc splicing and the like.
The number of the subframes in the preview layout frame is the same as the number of the pictures to be spliced in the picture set to be spliced, for example, if 5 pictures exist in the picture set to be spliced, 5 subframes exist in the preview layout frame; if there are 10 pictures in the picture set to be spliced, there are 10 subframes in the preview layout frame, each subframe corresponds to one picture to be spliced, after the preview layout frame is generated, each picture to be spliced in the picture set to be spliced is input into the subframe of the corresponding preview layout frame, and the corresponding spliced picture preview frame is generated, for example, the preview layout frame is longitudinally arranged, and there are 5 pictures to be spliced in the picture set to be spliced, 5 subframes are longitudinally arranged, and the 5 pictures to be spliced are input into the subframes corresponding to one another, so that the spliced picture preview frame composed of the 5 pictures to be spliced is generated.
In a specific embodiment provided by the present application, a preview layout frame is generated according to the target splicing configuration information C along the above example, where the preview layout frame includes 3 subframes, namely subframe 1, subframe 2, and subframe 3, and the 3 subframes are longitudinally arranged to form the preview layout frame, and 3 to-be-spliced pictures are respectively input into the 3 subframes, that is, picture 1 to be spliced is input into subframe 1, picture 2 to be spliced is input into subframe 2, and picture 3 to be spliced is input into subframe 3, so as to generate a spliced picture preview frame composed of the 3 to-be-spliced pictures.
Step 108: and receiving a frame processing instruction aiming at the spliced picture preview frame, wherein the frame processing instruction is determined according to the operation information collected by the sensor.
After the spliced picture preview frame is generated, a user can preview the generated initial spliced picture through the spliced picture preview frame, the generated initial spliced picture is not adjusted at the moment, and the user needs to adjust the initial spliced picture. Namely, sending a frame processing instruction to the spliced picture preview frame.
It should be noted that in the present application, the user directly issues a frame processing instruction for the stitched picture preview frame, instead of processing the initial stitched picture itself. The method includes the steps that adjustment processing is conducted on a spliced picture preview frame, a user conducts Pinch gesture and Pan gesture processing on a terminal, and sends a corresponding frame processing instruction to the terminal, for example, the spliced picture preview frame is enlarged or reduced through the Pinch gesture, the spliced picture preview frame is dragged through the Pan gesture, and the like. And sending a frame processing instruction to the spliced picture preview frame, determining the matching degree of processing only by considering the deviation value of the sub-frame without considering information such as the number, the position size and the like of the pictures to be spliced, loading the pictures to be processed in the sub-frame, adjusting the pictures to be processed along with the sub-frame without repeatedly loading the pictures to be processed, reducing the processing pressure of a terminal processor and improving the processing efficiency.
Specifically, receiving a frame processing instruction for the stitched picture preview frame includes:
and receiving frame adding and deleting instructions and/or frame adjusting instructions aiming at the spliced picture preview frame.
The frame processing instruction specifically comprises a frame adding and deleting instruction and a frame adjusting instruction, and when the user processes the spliced picture browsing frame, the user can add or delete a subframe, namely, add or delete a picture to be spliced, and can also adjust the size and the position of the subframe, namely, adjust the size and the position of the picture to be spliced.
In a specific embodiment provided by the application, when a user finds that less than one picture is spliced when browsing a spliced picture preview frame, a frame adding and deleting instruction is sent, a subframe is added, and a new picture to be spliced is added; when a user browses the spliced picture preview frame, the user finds that more than one picture is selected, selects the picture to be spliced to be deleted and sends a frame adding and deleting instruction, and deletes the sub-frame corresponding to the picture to be spliced; when browsing the spliced picture preview frame, a user finds that the position of the picture to be spliced needs to be adjusted, and the positions of the 2 nd picture and the 3 rd picture need to be exchanged, then a frame adjusting instruction is sent out, and the positions of the subframe of the 2 nd picture and the subframe of the 3 rd picture are adjusted to be exchanged; when a user finds that the 2 nd picture needs to be reduced when browsing the spliced picture preview frame, a frame adjusting instruction is sent out, and the subframe of the 2 nd picture is reduced.
Step 110: and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture.
After a frame processing instruction for the spliced picture preview frame is received, corresponding processing is performed on the spliced picture preview frame according to the frame processing instruction, and a new target spliced picture is generated.
Specifically, processing the stitched picture preview frame based on the frame processing instruction includes:
under the condition that the frame adding and deleting instruction is received, adding a new subframe according to the frame adding and deleting instruction, and adding a new picture to be spliced or deleting a subframe in the spliced picture preview frame;
and under the condition that the frame adjusting instruction is received, exchanging the sequence of the sub-frames in the spliced picture preview frame or adjusting the size of the sub-frames in the spliced picture preview frame according to the frame adjusting instruction.
Under the condition that a frame adding and deleting instruction is received, an operation of adding a new subframe and adding a new picture to be spliced is required to be executed according to the specific content of the frame adding and deleting instruction, or an operation of deleting a subframe in a spliced picture preview frame according to the frame adding and deleting instruction is required to be executed.
In a specific embodiment provided by the application, taking the add subframe as an example, when a frame add/delete instruction for the preview frame of the spliced picture is received, the instruction is analyzed to obtain the specific content of the instruction as the add subframe, at least one newly added picture to be spliced is obtained at the same time, a corresponding number of the newly added subframes are added according to the number of the newly added pictures to be spliced, and each newly added picture to be spliced is filled into each newly added subframe.
In a specific embodiment provided by the application, taking a subframe deletion as an example, when a frame add-delete instruction for a stitched picture preview frame is received, the instruction is analyzed, a delete instruction for a target subframe in the instruction is obtained, the target subframe is determined and deleted, parameters of each subframe in the stitched picture preview frame after the target subframe is deleted are updated and calculated in real time, and a new stitched picture preview frame is displayed.
In practical application, in addition to performing an operation of adding or deleting a subframe in the spliced picture preview frame, the position and size of the subframe in the spliced picture preview frame can be adjusted. For example, when two adjacent subframes are spliced, the subframes may be adjusted to overlap repeated portions of the pictures to be spliced in the subframes, so that two consecutive pictures to be spliced are spliced into a complete picture, and when a plurality of subframes are overlapped, the stacking order of each frame may be determined.
In a specific embodiment provided by the present application, the size of the subframe in the stitched image preview frame may also be adjusted, for example, a user may implement an operation of adjusting the size of the subframe by pinching or separating two fingers on a terminal screen, when the user performs the pinching operation, the size of the subframe may be reduced, and when the user performs the separating operation, the size of the subframe may be enlarged, so that the stitched image may be changed accordingly according to the requirement of the user.
Adjusting the size of a subframe in the spliced picture preview frame according to the frame adjusting instruction, wherein the adjusting comprises:
determining a target subframe in the spliced picture preview frame according to the frame adjusting instruction, and determining a scaling coefficient of the target subframe;
adjusting a size of the target subframe based on the scaling factor.
When the size of the subframe in the spliced picture preview frame is adjusted, a target subframe, namely the subframe needing to be adjusted, is determined according to a frame adjusting instruction, the zoom coefficient of the target subframe is determined through gesture operation, and then the final size of the target subframe after the adjusting instruction can be calculated according to the initial coefficient of the target subframe in the spliced picture preview frame.
The picture splicing method provided by the application receives the frame processing instruction for the spliced picture preview frame, processes the spliced picture preview frame according to the frame processing instruction, does not need to process an initial spliced picture generated by the pictures to be spliced, avoids traversing each picture to be spliced when the initial spliced picture is adjusted and modified, does not need to recalculate the layout of the pictures to be spliced when being inserted, deleted, adjusted in sequence and adjusted in size, directly processes the spliced picture preview frame, converts the splicing operation of the pictures into the layout operation of the sub-frame, saves computing resources, and improves the interactive experience and visual experience of a user in the process of splicing the pictures.
In another specific embodiment provided herein, the method further comprises:
and loading the spliced picture preview frame in a lazy loading mode, and storing the loaded part in the spliced picture preview frame into a cache.
Lazy loading is a loading mode for improving terminal performance, when a user scrolls a page, the content in a starting area is preferentially loaded, and the content in other parts is loaded after entering a visual area, so that the service performance is improved. When carrying out the picture concatenation, the size of picture all can exceed the scope of terminal screen usually, if the picture after will splicing is whole to be loaded and the user does not look over, will waste the loading resource, consequently adopt lazy loading's form, will enter into the partial loading in the visual region at terminal to add the part that the loading was accomplished in previewing the frame to the buffer memory in with the concatenation picture, be convenient for multiplex in subsequent handling, promote resource utilization.
Correspondingly, after the target stitched picture is generated, the method further comprises:
and releasing the spliced picture preview frame loaded in the cache.
After the target spliced picture is generated, it is shown that the processing of the spliced picture preview frame is completed, and at this time, the spliced picture preview frame which is stored in the cache and loaded well can be deleted without storing the spliced picture preview frame again, so that the corresponding cache control is released, and the resource utilization rate of the terminal is improved.
In practical application, after a plurality of pictures to be spliced are spliced, the size of the obtained target spliced picture is the sum of the sizes of all the pictures to be spliced, for example, the size of one picture to be spliced is 3M, if there are 10 pictures to be spliced, the size of the target spliced picture may reach 30M or even higher, and based on this, after the target spliced picture is generated, the method further includes:
and processing the target spliced picture based on a preset picture compression rule to obtain a compressed target spliced picture.
In order to reduce the consumption of a memory of the terminal and improve the usability of a target spliced picture, the target spliced picture can be compressed after the target spliced picture is obtained, and specific picture compression rules are subject to practical application, such as compression based on a preset length-width ratio, compression based on preset pixels, compression based on a preset picture size, and the like.
In the picture splicing method provided by the application, a picture splicing instruction is received; responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information; splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame; receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor; and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture. According to the image splicing method and device, the problem of solidification of the image splicing form is solved, meanwhile, the image processing instruction of the user is added to carry out interaction adjustment, the final image splicing effect is achieved according to the instruction of the user, the splicing mode is enriched, and the use experience of the user is improved.
Secondly, the spliced picture preview frame is processed according to the frame processing instruction, the initial spliced picture generated by the pictures to be spliced does not need to be processed, the situation that each picture to be spliced is traversed when the initial spliced picture is adjusted and modified is avoided, the layout of the pictures to be spliced does not need to be recalculated when the pictures are inserted, deleted, adjusted in sequence and adjusted in size, the spliced picture preview frame is directly processed, the splicing operation of the pictures is converted into the layout operation of the sub-frame, computing resources are saved, and the interactive experience and the visual experience of a user in the process of splicing the pictures are improved.
The following description further describes the picture stitching method by taking an application of the picture stitching method provided by the present application in stitching a panoramic picture as an example, with reference to fig. 2 and fig. 3. Fig. 2 is a frame schematic diagram of a picture stitching method according to an embodiment of the present application, and as shown in fig. 2, in an input stage, an initial picture set to be stitched and target stitching configuration information are input, in a processing stage, the initial picture set to be stitched is checked, a picture set to be stitched is obtained by screening, and then a stitched picture preview frame is generated by combining the target stitching configuration information. And then receiving an input frame processing instruction to generate a target spliced picture, and compressing the target spliced picture to obtain the compressed target spliced picture in order to reduce the consumption of the memory of the terminal.
Fig. 3 shows a processing flow chart of a picture stitching method applied to stitching a panoramic picture according to an embodiment of the present application, which specifically includes the following steps:
step 302: and receiving a picture splicing instruction.
In a specific embodiment provided by the application, a picture splicing instruction sent by a user is received, and the picture splicing instruction is used for splicing 5 continuously transversely shot pictures together to form a new spliced picture.
Step 304: and responding to the image splicing instruction to obtain an image set to be spliced, and obtaining target splicing configuration information.
In a specific embodiment provided by the present application, following the above example, in response to the picture splicing instruction, a picture set to be spliced is obtained, see a in fig. 4, where fig. 4 provides a schematic diagram of picture splicing provided in an embodiment of the present application, and a in fig. 4 is a schematic diagram of a picture set to be spliced in an embodiment of the present application. And acquiring target splicing configuration information, specifically 'transverse splicing', while acquiring a to-be-spliced picture set.
Step 306: and analyzing the target splicing configuration information to generate a preview layout frame.
In a specific embodiment provided by the application, following the above example, it is determined that 5 subframes need to be created according to the number of the pictures to be spliced in the picture set to be spliced, and after the target configuration information is analyzed, it is determined that the splicing form is horizontal splicing, and then 5 subframes are generated and horizontally spliced, so as to generate the preview layout frame.
Step 308: and inputting the pictures to be spliced in the picture set to be spliced into the preview layout frame to generate a spliced picture preview frame.
In a specific embodiment provided by the present application, following the above example, the 5 pictures to be stitched in the picture set to be stitched are sequentially input into the 5 subframes of the preview layout frame to generate a stitched picture preview frame, see b in fig. 4, where b in fig. 4 shows a schematic diagram of the stitched picture preview frame provided in the embodiment of the present application.
Step 310: and loading the spliced picture preview frame in a lazy loading mode, and storing the loaded part in the spliced picture preview frame into a cache.
In a specific embodiment provided by the application, following the above example, the length of the stitched picture preview frame already exceeds the width of the mobile phone screen, and in order to increase the processing speed of the mobile phone, only the part of the stitched picture preview frame displayed in the mobile phone screen is loaded, and the loaded part of the stitched picture preview frame is stored in the cache.
Step 312: and receiving a frame adjusting instruction aiming at the spliced picture preview frame.
In a specific embodiment provided by the application, along with the above example, a frame adjustment instruction for the spliced picture preview frame is received, and the splicing form is adjusted according to the requirement of the user.
Step 314: and processing the spliced picture preview frame according to the frame adjusting instruction to generate a target spliced picture.
In a specific embodiment provided by the present application, following the above example, the position of each subframe is adjusted according to the frame adjustment instruction, see c in fig. 4, where c in fig. 4 shows a schematic diagram of a target stitched picture provided by the embodiment of the present application.
Step 316: and compressing the target spliced picture to obtain the compressed target spliced picture, and deleting the content loaded in the spliced picture preview frame in the cache.
In a specific embodiment provided by the application, following the above example, the target stitched picture is compressed to obtain a compressed target stitched picture for a user to use, and the content loaded in the stitched picture preview frame in the cache is deleted at the same time.
In the picture splicing method provided by the application, a picture splicing instruction is received; responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information; splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame; receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor; and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture. According to the image splicing method and device, the problem of solidification of the image splicing form is solved, meanwhile, the image processing instruction of the user is added to carry out interaction adjustment, the final image splicing effect is achieved according to the instruction of the user, the splicing mode is enriched, and the use experience of the user is improved.
Secondly, the spliced picture preview frame is processed according to the frame processing instruction, the initial spliced picture generated by the pictures to be spliced does not need to be processed, the situation that each picture to be spliced is traversed when the initial spliced picture is adjusted and modified is avoided, the layout of the pictures to be spliced does not need to be recalculated when the pictures are inserted, deleted, adjusted in sequence and adjusted in size, the spliced picture preview frame is directly processed, the splicing operation of the pictures is converted into the layout operation of the sub-frame, computing resources are saved, and the interactive experience and the visual experience of a user in the process of splicing the pictures are improved.
Corresponding to the above method embodiment, the present application further provides an embodiment of a picture stitching device, and fig. 5 shows a schematic structural diagram of the picture stitching device provided in the embodiment of the present application. As shown in fig. 5, the apparatus includes:
a first receiving module 502 configured to receive a picture stitching instruction;
an obtaining module 504, configured to obtain a to-be-spliced picture set and target splicing configuration information in response to the picture splicing instruction;
a splicing module 506 configured to splice the to-be-spliced pictures in the to-be-spliced picture set based on the target splicing configuration information, and generate a spliced picture preview frame;
a second receiving module 508 configured to receive a frame processing instruction for the stitched picture preview frame, where the frame processing instruction is determined according to operation information acquired by a sensor;
a processing module 510 configured to process the stitched picture preview frame based on the frame processing instruction, and generate a target stitched picture.
Optionally, the obtaining module 504 is further configured to:
responding to the picture splicing instruction to obtain an initial picture set to be spliced;
and filtering the pictures in the initial picture set to be spliced according to a preset picture checking rule to obtain the picture set to be spliced.
Optionally, the picture splicing instruction includes a splicing configuration identifier;
the obtaining module 504 is further configured to:
and acquiring target splicing configuration information in a preset configuration information base according to the splicing configuration identifier.
Optionally, the splicing module 506 is further configured to:
analyzing the target splicing configuration information to generate a preview layout frame;
and inputting the pictures to be spliced in the picture set to be spliced into the preview layout frame to generate a spliced picture preview frame.
Optionally, the second receiving module 508 is further configured to:
and receiving frame adding and deleting instructions and/or frame adjusting instructions aiming at the spliced picture preview frame.
Optionally, the processing module 510 is further configured to:
under the condition that the frame adding and deleting instruction is received, adding a new subframe according to the frame adding and deleting instruction, and adding a new picture to be spliced or deleting a subframe in the spliced picture preview frame;
and under the condition that the frame adjusting instruction is received, exchanging the sequence of the sub-frames in the spliced picture preview frame or adjusting the size of the sub-frames in the spliced picture preview frame according to the frame adjusting instruction.
Optionally, the processing module 510 is further configured to:
determining a target subframe in the spliced picture preview frame according to the frame adjusting instruction, and determining a scaling coefficient of the target subframe;
adjusting a size of the target subframe based on the scaling factor.
Optionally, the apparatus further comprises:
and the loading cache module is configured to load the spliced picture preview frame in a lazy loading mode and store the loaded part in the spliced picture preview frame into a cache.
Optionally, the apparatus further comprises:
and the releasing module is configured to release the spliced picture preview frame loaded in the cache.
Optionally, the apparatus further comprises:
and the compression module is configured to process the target spliced picture based on a preset picture compression rule to obtain a compressed target spliced picture.
In the picture splicing device provided by the application, a picture splicing instruction is received; responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information; splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame; receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor; and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture. According to the image splicing method and device, the problem of solidification of the image splicing form is solved, meanwhile, the image processing instruction of the user is added to carry out interaction adjustment, the final image splicing effect is achieved according to the instruction of the user, the splicing mode is enriched, and the use experience of the user is improved.
Secondly, the spliced picture preview frame is processed according to the frame processing instruction, the initial spliced picture generated by the pictures to be spliced does not need to be processed, the situation that each picture to be spliced is traversed when the initial spliced picture is adjusted and modified is avoided, the layout of the pictures to be spliced does not need to be recalculated when the pictures are inserted, deleted, adjusted in sequence and adjusted in size, the spliced picture preview frame is directly processed, the splicing operation of the pictures is converted into the layout operation of the sub-frame, computing resources are saved, and the interactive experience and the visual experience of a user in the process of splicing the pictures are improved.
The above is a schematic scheme of the picture stitching apparatus of this embodiment. It should be noted that the technical solution of the image stitching device and the technical solution of the image stitching method belong to the same concept, and details that are not described in detail in the technical solution of the image stitching device can be referred to the description of the technical solution of the image stitching method.
Fig. 6 illustrates a block diagram of a computing device 600 provided according to an embodiment of the present application. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is coupled to the memory 610 via a bus 630 and a database 650 is used to store data.
Computing device 600 also includes access device 640, access device 640 enabling computing device 600 to communicate via one or more networks 660. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 640 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present application, the above-described components of computing device 600, as well as other components not shown in FIG. 6, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 6 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 600 may also be a mobile or stationary server.
Wherein, the processor 620 implements the steps of the image stitching method when executing the computer instructions.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned picture stitching method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the above-mentioned picture stitching method.
An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions, when executed by a processor, implement the steps of the aforementioned picture stitching method.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned picture stitching method belong to the same concept, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned picture stitching method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (13)

1. A picture splicing method is characterized by comprising the following steps:
receiving a picture splicing instruction;
responding to the image splicing instruction to obtain an image set to be spliced and target splicing configuration information;
splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame;
receiving a frame processing instruction for the spliced picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor;
and processing the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture.
2. The picture splicing method according to claim 1, wherein obtaining the set of pictures to be spliced in response to the picture splicing instruction comprises:
responding to the picture splicing instruction to obtain an initial picture set to be spliced;
and filtering the pictures in the initial picture set to be spliced according to a preset picture checking rule to obtain the picture set to be spliced.
3. The picture splicing method according to claim 1, wherein the picture splicing instruction comprises a splicing configuration identifier;
responding to the image splicing instruction to acquire target splicing configuration information, wherein the target splicing configuration information comprises:
and acquiring target splicing configuration information in a preset configuration information base according to the splicing configuration identifier.
4. The picture splicing method according to claim 1, wherein splicing the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information to generate a spliced picture preview frame comprises:
analyzing the target splicing configuration information to generate a preview layout frame;
and inputting the pictures to be spliced in the picture set to be spliced into the preview layout frame to generate a spliced picture preview frame.
5. The picture stitching method according to claim 1, wherein receiving a frame processing instruction for the stitched picture preview frame comprises:
and receiving frame adding and deleting instructions and/or frame adjusting instructions aiming at the spliced picture preview frame.
6. The picture splicing method of claim 5, wherein processing the spliced picture preview frame based on the frame processing instruction comprises:
under the condition that the frame adding and deleting instruction is received, adding a new subframe according to the frame adding and deleting instruction, and adding a new picture to be spliced or deleting a subframe in the spliced picture preview frame;
and under the condition that the frame adjusting instruction is received, exchanging the sequence of the sub-frames in the spliced picture preview frame or adjusting the size of the sub-frames in the spliced picture preview frame according to the frame adjusting instruction.
7. The picture splicing method according to claim 6, wherein the adjusting the size of the sub-frame in the spliced picture preview frame according to the frame adjustment instruction comprises:
determining a target subframe in the spliced picture preview frame according to the frame adjusting instruction, and determining a scaling coefficient of the target subframe;
adjusting a size of the target subframe based on the scaling factor.
8. The picture splicing method according to any one of claims 1 to 7, wherein the method further comprises:
and loading the spliced picture preview frame in a lazy loading mode, and storing the loaded part in the spliced picture preview frame into a cache.
9. The picture splicing method according to claim 8, wherein after generating the target spliced picture, the method further comprises:
and releasing the spliced picture preview frame loaded in the cache.
10. The picture splicing method according to any one of claims 1 to 7, wherein after generating the target spliced picture, the method further comprises:
and processing the target spliced picture based on a preset picture compression rule to obtain a compressed target spliced picture.
11. A picture stitching device, comprising:
the first receiving module is configured to receive a picture splicing instruction;
the acquisition module is configured to respond to the picture splicing instruction to acquire a picture set to be spliced and target splicing configuration information;
the splicing module is configured to splice the pictures to be spliced in the picture set to be spliced based on the target splicing configuration information, and splice a picture preview frame;
a second receiving module configured to receive a frame processing instruction for the stitched picture preview frame, wherein the frame processing instruction is determined according to operation information acquired by a sensor;
and the processing module is configured to process the spliced picture preview frame based on the frame processing instruction to generate a target spliced picture.
12. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-10 when executing the computer instructions.
13. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 10.
CN202111187585.9A 2021-10-12 2021-10-12 Picture splicing method and device Pending CN113870114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111187585.9A CN113870114A (en) 2021-10-12 2021-10-12 Picture splicing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111187585.9A CN113870114A (en) 2021-10-12 2021-10-12 Picture splicing method and device

Publications (1)

Publication Number Publication Date
CN113870114A true CN113870114A (en) 2021-12-31

Family

ID=78999135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111187585.9A Pending CN113870114A (en) 2021-10-12 2021-10-12 Picture splicing method and device

Country Status (1)

Country Link
CN (1) CN113870114A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302671A (en) * 2017-06-30 2017-10-27 北京金山安全软件有限公司 Material splicing processing method and device, electronic equipment and storage medium
CN109146783A (en) * 2018-07-23 2019-01-04 北京金山安全软件有限公司 Picture splicing method and device, electronic equipment and medium
CN110209378A (en) * 2019-04-26 2019-09-06 平安科技(深圳)有限公司 Page generation method, device, terminal and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302671A (en) * 2017-06-30 2017-10-27 北京金山安全软件有限公司 Material splicing processing method and device, electronic equipment and storage medium
CN109146783A (en) * 2018-07-23 2019-01-04 北京金山安全软件有限公司 Picture splicing method and device, electronic equipment and medium
CN110209378A (en) * 2019-04-26 2019-09-06 平安科技(深圳)有限公司 Page generation method, device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡梦杰 等: "《JAVASCRIPT程序设计案例教程 第2版》", 31 August 2021, 北京:航空工业出版社, pages: 212 - 217 *

Similar Documents

Publication Publication Date Title
JP6326411B2 (en) Video communication method, video communication apparatus, program, and recording medium
CN109168026B (en) Instant video display method and device, terminal equipment and storage medium
US10514818B2 (en) System and method for grouping related photographs
WO2020029526A1 (en) Method for adding special effect to video, device, terminal apparatus, and storage medium
EP3151548A1 (en) Video recording method and device
US20140105564A1 (en) Creating time lapse video in real-time
JP2023519625A (en) Video processing method, apparatus, electronic equipment and non-transitory computer-readable storage medium
CN112804459A (en) Image display method and device based on virtual camera, storage medium and electronic equipment
EP2824633A1 (en) Image processing method and terminal device
CN106453572B (en) Method and system based on Cloud Server synchronous images
US9064349B2 (en) Computer-implemented image composition method and apparatus using the same
US20180352293A1 (en) Media information processing method, media information processing apparatus, and storage medium
CN105430393B (en) Picture processing method, picture processing device, picture processing platform and storage medium
CN114598815B (en) Shooting method, shooting device, electronic equipment and storage medium
CN113225606B (en) Video barrage processing method and device
CN110580508A (en) video classification method and device, storage medium and mobile terminal
CN107092428A (en) A kind of picture amending method and device
US20220269714A1 (en) Multimedia information processing method, apparatus, electronic device, and medium
CN113938620B (en) Image processing method, mobile terminal and storage medium
US10783319B2 (en) Methods and systems of creation and review of media annotations
CN109167939B (en) Automatic text collocation method and device and computer storage medium
US11871137B2 (en) Method and apparatus for converting picture into video, and device and storage medium
CN113870114A (en) Picture splicing method and device
CN105592319A (en) Server screenshot method and server
CN114500844A (en) Shooting method and device and electronic equipment

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