Partial processing method, device and storage medium of panoramic image
Patent Information
- Application Number
- CN202211655333.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2042-12-22
AI Technical Summary
Existing panoramic image processing methods cannot meet users' needs for beautifying local areas of panoramic images, resulting in insufficient processing flexibility.
The 3D shapes and textures in the six-sided images of the 3D panoramic image are mapped to different color values, generating a channel map corresponding to each face. In response to the received selection operation, the pixels with the same pixel value are identified, and the parameters of the model to be processed are adjusted to generate the processed panoramic image.
It enables local beautification of panoramic images, improves processing flexibility, and allows selection and processing of local areas of panoramic images in 3D scenes.
Smart Images

Figure CN116206088B_ABST
Abstract
Description
Technical Field
[0001] This application relates to methods, apparatus, and storage media for local processing of panoramic images, and belongs to the field of image technology. Background Technology
[0002] Panoramic images utilize wide-angle perspectives and various formats such as painting, photography, video, and 3D models to represent as much of the surrounding environment as possible. Currently, panoramic images typically consist of six views: front, back, left, right, top, and bottom. After the panoramic image is created, it often requires enhancement processing.
[0003] Traditional panoramic image processing methods involve global processing, such as modifying the overall color of the panoramic image to change the display effect.
[0004] However, users may only need to enhance a local area in the panoramic image, but the current global enhancement method cannot meet the needs of local enhancement, resulting in a problem of overlapping flexibility in processing panoramic images. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, and storage medium for local processing of panoramic images, which can solve the problems of the inability to perform local beautification of panoramic images and the low flexibility of panoramic image processing.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] According to a first aspect, embodiments of this application provide a method for local processing of a panoramic image, the method comprising:
[0008] The 3D shapes and textures in the six-sided images of the 3D panoramic image are mapped to different color values, generating a channel map corresponding to each face. The same color in the channel map corresponds to the same model to be processed.
[0009] The panoramic image is superimposed on the corresponding channel image according to pixel position;
[0010] In response to receiving a selection operation applied to the panoramic image, the pixel point in the channel image that has the same pixel value is determined based on the pixel value at the position where the selection operation is applied;
[0011] The pixels are mapped to the panoramic image to obtain the model to be processed according to the selection operation instruction;
[0012] The model to be processed is processed to obtain the processed panoramic image.
[0013] Optionally, processing the model to be processed to obtain the processed panoramic image includes:
[0014] The parameters of the model to be processed are adjusted to obtain the processed model;
[0015] The pixel values of the processed model are applied to the panoramic image to obtain the processed panoramic image.
[0016] Optionally, adjusting the parameters of the model to be processed to obtain the processed model includes:
[0017] The contrast, brightness, hue, color level, color temperature, and / or texture of the model to be processed are enhanced to obtain the processed model.
[0018] Optionally, adjusting the parameters of the model to be processed to obtain the processed model includes:
[0019] The parameters of the model to be processed are adjusted using a coloring language to obtain the processed model.
[0020] Optionally, the step of mapping the 3D shapes and 3D textures in the six-sided view of the 3D panoramic image to different color values to generate a channel map corresponding to each face includes:
[0021] Color mapping is performed on the mesh model of the panoramic image to obtain the channel map corresponding to each face.
[0022] Optionally, determining the pixel point in the channel image that has the same pixel value as the selected location based on the pixel value at the position where the selection operation is applied includes:
[0023] The pixel values are read via the GPU;
[0024] Search the channel graph for pixels with the same pixel value.
[0025] Optionally, the step of overlaying the panoramic image onto the corresponding channel image according to pixel position includes:
[0026] For each pixel position in the six-view image of the panoramic image, the pixel at that pixel position is superimposed onto the pixel at the same pixel position in the channel image to synthesize a new panoramic image.
[0027] Optionally, different colors correspond to different models to be processed.
[0028] According to a second aspect, embodiments of this application provide a local processing apparatus for panoramic images. The apparatus includes a memory and a processor. The memory stores at least one program instruction, and the processor loads and executes the at least one program instruction to implement the local processing method for panoramic images described in the first aspect.
[0029] According to a third aspect, embodiments of this application provide a computer storage medium storing at least one program instruction, which is loaded and executed by a processor to implement the local processing method for panoramic images described in the first aspect.
[0030] The panoramic image local processing method provided in this application generates a channel map corresponding to each face by mapping the 3D model and 3D texture in the six-sided image of a 3D panoramic image to different color values; the panoramic image is superimposed on the corresponding channel map according to pixel position; in response to receiving a selection operation applied to the panoramic image, the pixel point in the channel map with the same pixel value is determined based on the pixel value at the position where the selection operation is applied; the pixel point is mapped to the panoramic image to obtain the model to be processed indicated by the selection operation; the model to be processed is processed to obtain the processed panoramic image; this method can solve the problem that it is impossible to perform local beautification on panoramic images and the processing flexibility of panoramic images is not high; it can realize the local selection of the model to be processed in the panoramic image in a 3D scene, and improve the flexibility of panoramic image processing.
[0031] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0032] Figure 1 A flowchart of a method for partial processing of a panoramic image provided in one embodiment of this application. Detailed Implementation
[0033] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] In the description of this application, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating the viewpoint or positional relationship, are based on the viewpoint or positional relationship shown in the accompanying drawings and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific viewpoint, or be constructed and operated from a specific viewpoint, and therefore should not be construed as a limitation on this application. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0035] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0036] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0037] The panoramic image local processing method provided in this application is used in an electronic device as an example. The electronic device can be a terminal or a server. The terminal can be a computer, tablet computer, or mobile phone, etc., which have computing capabilities. This embodiment does not limit the implementation method of the electronic device.
[0038] Figure 1 This is a flowchart of a partial processing method for a panoramic image provided in one embodiment of this application, as shown below. Figure 1 As shown, the method includes at least the following steps:
[0039] Step 101: Map the 3D shapes and 3D textures in the six-sided images of the 3D panoramic image to different color values, and generate a channel map corresponding to each face. The same color in the channel map corresponds to the same model to be processed.
[0040] Specifically, color mapping is performed based on the mesh model of the panoramic image to obtain the channel map corresponding to each face.
[0041] The six-sided image includes 3D models and 3D textures. In this embodiment, the 3D models and 3D textures in the panoramic six-sided image are mapped to different color values, and six channel images corresponding to the six-sided image are rendered. Models with the same channel image share the same color, and different models in the same panoramic image do not reuse the same color. Based on the generated channel images, it is possible to select pixels of the corresponding model in the panoramic image within a 3D scene, and to select models across different faces. Cross-face selection is achieved by using the fact that the color values of the same model in the channel images are the same. When the user selects a pixel, the color value of the channel image for that pixel is read, all pixel positions with the same color value in all channel images are selected, and mapped to the corresponding pixel positions in the panoramic six-sided image. This way, the same model on different faces is selected.
[0042] Optionally, different colors correspond to different models to be processed.
[0043] Step 102: Overlay the panoramic image onto the corresponding channel image according to pixel position.
[0044] For each pixel position in the six-view image of the panoramic image, the pixels at that pixel position are superimposed onto the pixels at the same pixel position in the channel image to synthesize a new panoramic image.
[0045] Each pixel in the six-sided panoramic image corresponds to a pixel in the channel image, creating a locally enhanced panoramic image with a one-to-one pixel correspondence. Different colors in the channel image are matched with different models to be processed, ensuring that the channel image and the six-sided image have the same pixel coordinates, together forming a new panoramic image. This panoramic image supports local selection in a 3D scene, ensuring that each selection is of the entire model.
[0046] Step 103: In response to receiving a selection operation applied to the panoramic image, determine the pixel point in the channel image that has the same pixel value as the position where the selection operation is applied.
[0047] The selection operation can be performed using a mouse or a touch screen. This embodiment does not limit the implementation method of the selection operation.
[0048] Specifically, based on the pixel value at the location where the selection operation is performed, the pixel point in the channel map that has the same pixel value is determined, including: reading the pixel value through the GPU; and searching for the pixel point in the channel map that has the same pixel value.
[0049] Step 104: Map the pixels to the panoramic image to obtain the model to be processed with the selection operation instruction.
[0050] Taking the selection operation implemented by the mouse as an example, when the mouse clicks on a part of the panoramic image, the GPU reads the pixel value at the current position, selects all pixels of the same color in the channel image, and maps them to the corresponding panoramic image, selecting all pixels at the corresponding position in the panoramic image, thus achieving local selection.
[0051] Step 105: Process the model to be processed to obtain the processed panoramic image.
[0052] In one example, the parameters of the model to be processed are adjusted to obtain the processed model; the pixel values of the processed model are then applied to the panoramic image to obtain the processed panoramic image.
[0053] The process involves adjusting the parameters of the model to be processed to obtain the processed model, including:
[0054] Enhance the contrast, brightness, hue, color level, color temperature, and / or texture of the model to be processed to obtain the processed model.
[0055] Specifically, a shader language can be used to adjust the parameters of the model to be processed, resulting in a processed model. The locally adjusted pixel values are then reapplied to the six-sided panoramic image and saved to generate a new six-sided panoramic image.
[0056] In summary, the local processing method for panoramic images provided in this embodiment maps the 3D shapes and textures in the six-sided images of a 3D panoramic image to different color values, generating a channel map corresponding to each face; the panoramic image is superimposed on the corresponding channel map according to pixel positions; in response to a selection operation applied to the panoramic image, the pixel point in the channel map with the same pixel value is determined based on the pixel value at the position where the selection operation is applied; the pixel point is mapped to the panoramic image to obtain the model to be processed indicated by the selection operation; the model to be processed is processed to obtain the processed panoramic image; this method can solve the problem of not being able to perform local beautification on panoramic images and the low flexibility of panoramic image processing; it can realize the local selection of the model to be processed in the panoramic image in a 3D scene, and improve the flexibility of panoramic image processing.
[0057] Optionally, this application also provides a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the local processing method of the panoramic image in the above method embodiments.
[0058] Optionally, this application also provides a computer product including a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the local processing method of the panoramic image in the above method embodiments.
[0059] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0060] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for local processing of panoramic images, characterized in that, The method includes: The 3D shapes and textures in the six-sided images of the 3D panoramic image are mapped to different color values, generating a channel map corresponding to each face. The same color in the channel map corresponds to the same model to be processed. The panoramic image is superimposed on the corresponding channel image according to pixel position; In response to receiving a selection operation applied to the panoramic image, the pixel point in the channel image that has the same pixel value is determined based on the pixel value at the position where the selection operation is applied; The pixels are mapped to the panoramic image to obtain the model to be processed according to the selection operation instruction; The model to be processed is processed to obtain the processed panoramic image; Specifically, color mapping is performed based on the mesh model of the panoramic image to obtain the channel map corresponding to each face; The six-sided image includes 3D modeling and 3D textures. The 3D modeling and 3D textures in the panoramic six-sided image are mapped to different color values, and six channel images corresponding to the six-sided image are rendered. The same model in the channel image is the same color, and different models in the same panoramic image do not use the same color repeatedly. Cross-face selection is achieved by using the fact that the same model in the channel image is the same. When the user selects a pixel position, the color value of the channel image of the current pixel position is read, all pixel positions with the same color value in all channel images are selected, and mapped to the corresponding pixel position in the panoramic six-sided image. In this way, the same model on different faces is selected.
2. The method according to claim 1, characterized in that, The process of processing the model to be processed to obtain the processed panoramic image includes: The parameters of the model to be processed are adjusted to obtain the processed model; The pixel values of the processed model are applied to the panoramic image to obtain the processed panoramic image.
3. The method according to claim 2, characterized in that, The step of adjusting the parameters of the model to be processed to obtain the processed model includes: The contrast, brightness, hue, color level, color temperature, and / or texture of the model to be processed are enhanced to obtain the processed model.
4. The method according to claim 2, characterized in that, The step of adjusting the parameters of the model to be processed to obtain the processed model includes: The parameters of the model to be processed are adjusted using a coloring language to obtain the processed model.
5. The method according to claim 1, characterized in that, The process of mapping the 3D shapes and textures in the six-sided images of the 3D panoramic image to different color values, and generating a channel map corresponding to each face, includes: Color mapping is performed on the mesh model of the panoramic image to obtain the channel map corresponding to each face.
6. The method according to claim 1, characterized in that, Determining the pixel point in the channel image that has the same pixel value as the selected location based on the pixel value at the position where the selection operation is applied includes: The pixel values are read via the GPU; Search the channel graph for pixels with the same pixel value.
7. The method according to claim 1, characterized in that, The step of overlaying the panoramic image onto the corresponding channel image according to pixel position includes: For each pixel position in the six-view image of the panoramic image, the pixel at that pixel position is superimposed onto the pixel at the same pixel position in the channel image to synthesize a new panoramic image.
8. The method according to any one of claims 1 to 7, characterized in that, Different colors correspond to different models to be processed.
9. A local processing device for panoramic images, characterized in that, The device includes a memory and a processor, the memory storing at least one program instruction, and the processor loading and executing the at least one program instruction to implement the local processing method of the panoramic image as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The computer storage medium stores at least one program instruction, which is loaded and executed by a processor to implement the local processing method of the panoramic image as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Model component clicking method and device, computer equipment and storage medium
CN112348962A
