Image processing method and device, electronic equipment and computer readable storage medium

By converting the spherical panorama into a cubic panorama and modifying the target area on the cube surface, the problem of partial modification of the panorama is solved, efficient and easy-to-use partial modification of the panorama and privacy protection are achieved, and the user experience and content display are improved. .

CN118657657APending Publication Date: 2024-09-17HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310280972.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

It is difficult to efficiently perform local modifications to the panorama with existing technology. Especially in the field of virtual reality, when protecting privacy and enriching content in local areas of the panorama, traditional solutions suffer from poor user experience and complex operations.

Method used

By converting the spherical panorama into a cube panorama, modifying the target area on one side of the cube panorama, and using the modified target area to update the spherical panorama, local real modification and desensitization of the original panorama is achieved, reducing the Operational difficulty and algorithm complexity.

Benefits of technology

It achieves efficient partial modification of the panorama, improves the user experience, simplifies the operation process, avoids the risk of privacy leakage, and improves the richness of content display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657657A
    Figure CN118657657A
Patent Text Reader

Abstract

The embodiment of the invention provides an image processing method and device, electronic equipment and a computer readable storage medium. The image processing method comprises the steps of generating a cube panorama from a spherical panorama based on a position relationship between a spherical model and a cube model; modifying a target area on one surface of the cubic panorama; and updating the spherical panorama by using the modified target area. Based on the mode, the real local modification of the original panorama is realized, the display content of the panorama is enriched, and the method is easy to operate and use by a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and more specifically, to the field of image processing technology. The embodiments of the present disclosure relate to an image processing method, an image processing apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Panorama is widely used in cloud exhibition halls, cloud house viewing and other fields. It is a virtual reality (VR) technology that converts panoramas and displays them interactively in 360×180° on a computer or mobile phone browser or client.

[0003] In practical applications, it is often necessary to perform modification operations such as "face-changing" or "decoration" on local areas of the panorama (for example, PS operation). For example, mosaic, that is, for privacy and security reasons, it is necessary to encode local areas such as faces, license plates, house numbers, etc. in the panorama. For another example, in online shopping applications, through online panoramic house viewing, a painting or advertisement is simulated in the room, and users can preview the effect before deciding whether to buy. In addition, such needs often exist in VR games or VR drawings. Regarding the partial replacement or modification of panoramas, there is currently a need and room for improvement in many aspects. Summary of the invention

[0004] The embodiments of the present disclosure provide an image processing solution for performing more efficient and convenient local modification on a panoramic image.

[0005] According to a first aspect of the present disclosure, an image processing method is provided. The method includes: generating a cubic panorama from a spherical panorama based on the positional relationship between a spherical model and a cubic model; modifying a target area on one face of the cubic panorama; and updating the spherical panorama using the modified target area. Based on this method, local modification of the original panorama is achieved, so that the original panorama can be truly desensitized and the panorama display content can be enriched, and the method is easy for users to operate and use.

[0006] In some embodiments of the first aspect, the method may further include: in response to the target area being located on multiple faces of the cube panorama, adjusting the positional relationship between the spherical model and the cube model; and updating the cube panorama based on the adjusted positional relationship, wherein the target area is located on one face of the updated cube panorama. Based on this approach, the cross-face to-be-modified region can be transferred to a single face of the cube panorama, thereby reducing the difficulty of local modification.

[0007] In some embodiments of the first aspect, updating the panoramic spherical image using the modified target area may include: updating the spherical panoramic image using the modified target area based on the adjusted positional relationship. Based on this method, the modified cubic panoramic image is mapped to the original spherical panoramic image, and the original spherical panoramic image is truly modified.

[0008] In some embodiments of the first aspect, adjusting the positional relationship between the spherical model and the cubic model may include: determining a point in the target area as the center point of a face of the updated cubic panorama; determining the spherical coordinates of the point in the spherical panorama; and adjusting the positional relationship between the spherical model and the cubic model based on the spherical coordinates. Based on this approach, the target area can be set as the center of a single face, and the target area can be located on a single face of the cubic panorama as much as possible.

[0009] In some embodiments of the first aspect, adjusting the positional relationship between the spherical model and the cubic model may include: rotating the cubic model relative to the spherical model. Based on this approach, the positional relationship between the spherical model and the cubic model can be flexibly adjusted to transfer the cross-surface target area to a single surface.

[0010] In some embodiments of the first aspect, adjusting the positional relationship between the spherical model and the cubic model may include: rotating the cubic model in the horizontal direction relative to the spherical model. Based on this approach, the target area that spans the horizontal direction can be transferred to a single surface in a simpler way.

[0011] In some embodiments of the first aspect, modifying a target area on a face of the cubic panorama may include: determining the target area by selecting multiple corner points of the target area on the face; and covering the target area with a map. Based on this approach, it is possible to more flexibly select the target area to be partially modified, and modify the panorama using a map matching the target area.

[0012] In some embodiments of the first aspect, covering the target area with a map may include: determining a perspective transformation on a surface based on multiple corner points; generating a perspective picture corresponding to the perspective transformation from the map based on the perspective transformation; and covering the target area with the perspective picture. Based on this approach, perspective transformation can be performed based on the surface of a cube, which is particularly suitable for objects with a linear perspective transformation relationship, reducing the implementation complexity of the algorithm.

[0013] In some embodiments of the first aspect, the target area may correspond to a rectangular object. Based on this approach, for common rectangular objects in the spherical panorama, a perspective map matching the original target area is generated in a simpler perspective manner and covered.

[0014] In some embodiments of the first aspect, modifying a target area on a face of the cubic panorama may include: selecting the target area according to user input; and modifying the target area based on the user input. In this way, the user can perform more precise local modification on the spherical panorama to meet diverse photo editing needs.

[0015] In some embodiments of the first aspect, updating the spherical panorama using the modified target area may include: projecting a surface of the cube panorama as a portion of the spherical panorama; and updating the spherical panorama using the projected portion corresponding to the surface. Based on this approach, the spherical panorama can be updated with the entire surface of the cube panorama, reducing the implementation complexity of the algorithm.

[0016] In some embodiments of the first aspect, updating the spherical panorama using the modified target area may include: projecting the modified target area as a portion of the spherical panorama; and updating the spherical panorama using the projected portion corresponding to the target area. Based on this approach, the amount of data that needs to be updated is reduced and performance is improved.

[0017] In some embodiments of the first aspect, the method may further include: generating another cubic panorama from the updated spherical panorama, the target area being included in a face of the other cubic panorama; and presenting the other cubic panorama. Based on this approach, the user can preview the modification effect of the panorama in real time, thereby improving the user experience.

[0018] According to a second aspect of the present disclosure, an electronic device is provided. The electronic device includes: a processing unit and a memory, and the processing unit executes instructions in the memory so that the electronic device performs a method. The method includes: generating a cubic panorama from a spherical panorama based on a positional relationship between a spherical model and a cubic model; modifying a target area on a face of the cubic panorama; and updating the spherical panorama using the modified target area.

[0019] According to a third aspect of the present disclosure, an image processing device is provided. The device includes: a cube panorama generating unit configured to generate a cube panorama from a spherical panorama based on a positional relationship between a spherical model and a cube model; a modifying unit configured to modify a target area on a face of the cube panorama; and a spherical panorama updating unit configured to update the spherical panorama using the modified target area.

[0020] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to enable the processor to perform the method according to the first aspect of the present disclosure.

[0021] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising machine executable instructions, which, when executed by a device, cause the device to perform the method according to the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0023] Figure 1 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown;

[0024] Figure 2 A software structure block diagram of an electronic device provided by an embodiment of the present disclosure is shown;

[0025] Figure 3 A schematic diagram showing an example conversion between a spherical panorama and a cubic panorama according to an embodiment of the present disclosure;

[0026] Figure 4 A schematic flow chart of an image processing method according to an embodiment of the present disclosure is shown;

[0027] Figure 5 A schematic diagram showing the positional relationship between a spherical model and a cubic model according to an embodiment of the present disclosure;

[0028] Figure 6 A schematic diagram showing a process for local modification of a panoramic image according to an embodiment of the present disclosure is shown;

[0029] Figure 7 A schematic diagram showing another process for partial modification of a panoramic image according to an embodiment of the present disclosure is shown;

[0030] Figure 8 A schematic diagram showing another process for partial modification of a panoramic image according to an embodiment of the present disclosure; and

[0031] Fig. 9 A schematic diagram showing another process for partial modification of a panoramic image according to an embodiment of the present disclosure is shown;

[0032] Fig.10 A schematic block diagram of an image processing apparatus according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0033] The technical solution of the present disclosure will be described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments.

[0034] The technical solutions in the embodiments of the present disclosure will be described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means and / or. For example, A / B can represent A or B, or A and B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "plurality" or "multiple" refers to two or more than two.

[0035] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0036] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limitations on the present disclosure. As used in the specification and appended claims of the present disclosure, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present disclosure, "at least one", "one or more" refer to one, two or more. The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0037] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present disclosure. Thus, the phrases "one embodiment", "some embodiments", "another embodiment", "some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0038] The numbers or numerical values ​​used in this specification are all illustrative and are only intended to facilitate understanding of the techniques of the embodiments of the present disclosure, and are by no means intended to limit the scope of the present disclosure.

[0039] The method provided in the embodiments of the present disclosure can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present disclosure do not impose any restrictions on the specific types of electronic devices.

[0040] For example, Figure 1 1 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0041] It is to be understood that the structure illustrated in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 100. In other embodiments of the present disclosure, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0042] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0043] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0044] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0045] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0046] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0047] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0048] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0049] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0050] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0051] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0052] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0053] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present disclosure is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present disclosure, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0054] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0055] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0056] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0057] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0058] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0059] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0060] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0061] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0062] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0063] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0064] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0065] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0066] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0067] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0068] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0069] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0070] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0071] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, at least one App required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0072] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0073] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0074] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0075] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0076] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0077] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0078] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0079] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0080] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0081] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0082] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0083] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0084] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0085] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.

[0086] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0087] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0088] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0089] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0090] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0091] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0092] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0093] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an embedded SIM (eSIM) card, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0094] It should be understood that the phone card in the embodiments of the present disclosure includes but is not limited to a SIM card, an eSIM card, a universal subscriber identity module (USIM), a universal integrated circuit card (UICC), and the like.

[0095] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The present disclosure takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0096] Figure 2 1 is a software structure diagram of the electronic device 100 of the embodiment of the present disclosure. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer can include a series of application packages.

[0097] like Figure 2 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0098] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0099] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0100] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0101] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0102] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0103] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0104] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0105] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0106] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0107] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0108] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0109] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0110] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0111] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0112] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0113] A 2D graphics engine is a drawing engine for 2D drawings.

[0114] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0115] It should be understood that the technical solution in the embodiment of the present disclosure can be used in Android TM 、iOS TM , Hongmeng TM etc. system.

[0116] The technical solution of the embodiment of the present disclosure can be applied to electronic devices to enhance the user experience of users viewing real or virtual reality panoramic images. Users can simply and conveniently modify the panoramic image, implement partial modification operations on the original panoramic image, protect user privacy or enhance the user's experience of viewing the panoramic image. The electronic device in the embodiment of the present disclosure can be a laptop computer, or a portable electronic device such as a mobile phone, a tablet computer, a camera, a video camera, a video recorder, or other electronic devices with battery life, electronic devices in a 5G network, or electronic devices in a future evolving public land mobile communication network (PLMN), etc., and the present disclosure does not limit this.

[0117] As mentioned above, panoramas (e.g., spherical panoramas) are widely used in the field of virtual reality. Considering user privacy protection or to enrich the display content, it is sometimes necessary to modify the local content in the original panorama. This local modification is more difficult than ordinary pictures.

[0118] At present, the traditional solution in the industry is the "masking solution": when entering a panoramic scene, the image is dynamically "masked" to the target local area, so that it looks like the local area has been replaced. The disadvantage of this solution is that the masked image will always be loaded later than the panorama, resulting in a flash of seeing the panorama content as the background first and then the masked image, which has the disadvantage of "revealing the truth" and poor user experience. Another problem with this solution is that the original image is not desensitized, and malicious users can obtain the original panorama through developer debugging methods. Some traditional solutions also use offline modification methods: users modify the panorama offline (also known as "PS") and then upload it to the panoramic platform. The disadvantage of this solution is that the workload is huge, file uploading, downloading, editing, etc. are time-consuming and laborious, and it requires users to master the use of professional tools, which requires high skills and cannot be previewed in time.

[0119] In view of the above existing problems, a solution for partially modifying the panorama is provided to facilitate display on the user terminal screen. In general, the solution is based on the mutual conversion between the spherical model (sphere) and the cube panoramic model (cube). The cube panoramic model is also called the skybox, which has six faces, each of which can be mapped. By setting the viewing point inside the cube, an immersive visual display effect is formed.

[0120] In this scheme, according to the positional relationship between the spherical model and the cube model, the spherical panorama as the original panorama is projected into a cube panorama. In some embodiments, the projection from the spherical panorama to the cube panorama can be based on an equidistant cylindrical to perspective projection algorithm (or other algorithms). Then, the target area is modified on one face of the cube panorama, and the spherical panorama is updated using the modified target area. The modified target area is still located on one face of the cube panorama. The process of updating the spherical spherical panorama also depends on the positional relationship between the cube model and the spherical model, and a perspective to equidistant cylindrical projection algorithm can be used. Based on this approach, local modification of the original panorama is achieved, so that the original panorama can be truly desensitized and the panorama display content can be enriched, and this method is easy for users to operate and use.

[0121] For example, in combination Figure 3 , the implementation principle of panoramic display is introduced. Figure 3A schematic diagram showing an example conversion between a spherical panorama and a cubic panorama according to an embodiment of the present disclosure.

[0122] As shown in the figure, the original panorama can be a spherical panorama based on a spherical model. In some embodiments, the spherical panorama can be, for example, a spherical model panoramic picture with an aspect ratio of 2: 1. For a real-world panorama, the original spherical panorama can be obtained by shooting with a special camera, or a camera can be used to shoot scene pictures (for example, four pictures of 360 degrees in the horizontal direction, one picture at the top, and one picture at the bottom), and the original spherical panorama can be obtained by software synthesis later. In some embodiments, the original panorama can also be generated by virtual reality (VR) software, for example, a panorama in a VR game.

[0123] The original panorama can be projected onto a spherical model, and each pixel point in the original panorama is mapped to a point on the spherical model. For example, the coordinates of the Cartesian coordinate system of the original panorama can be mapped to the spherical coordinates of the spherical model. The spherical coordinates may include a horizontal angle (ath) and a vertical angle (atv).

[0124] Then, using the spherical model, the original spherical panorama is further converted into 6 pictures of the 6 faces of the cube panoramic model. The conversion algorithm can be, for example, an equidistant cylinder to perspective projection algorithm, which is not limited in the present disclosure. Each spherical coordinate can be projected as a two-dimensional coordinate on a certain face of the cube panorama. In some embodiments, if the picture of a single face is too large (for example, the number of pixels exceeds a certain threshold), the square pictures on a single face can be further tiled (tiling) according to performance requirements, so that a face can be formed like paving tiles.

[0125] Next, paste the six pictures to the six faces of the cube model. As mentioned above, each face of the cube can be tiled to improve performance and experience. If it is not tiled, it can be understood as a situation where each face has only one tile. Here, assuming that the user's observation point is at the center of the cube model, the user can adjust the relative position relationship between the cube panoramic model and the spherical panoramic model by rotating and dragging, and the lens distance (zoom in / out) control function to achieve a panoramic interactive display on the terminal screen.

[0126] It should be noted that when the user adjusts the positional relationship, it may be necessary to regenerate the pictures of each face of the cube panorama. That is, the pictures on each face of the cube panorama can change with the user's operation. In some embodiments, the cube panorama displayed on the terminal screen may include multiple faces, for example, the picture of the face in front of the user's perspective is fully displayed, and the pictures on the left and right sides, as well as the pictures of the top and bottom surfaces are partially displayed. Grid auxiliary lines can be displayed on the terminal screen to help the user observe the dividing lines between the faces of the cube panorama.

[0127] In some cases, some areas in the cube panorama (for example, electronic screens, display boards, photos and other objects) may be displayed across surfaces, which may bring certain difficulties to blocking or modifying. In this case, the positional relationship between the cube panorama model and the spherical panorama model can be adjusted to fully display the area to be modified or blocked on a single surface as much as possible. The details of the embodiments of the present disclosure in this regard will be described in detail below.

[0128] It should be noted that Figure 3 The example transformation shown is one possible example implementation, in which some steps or modules may be omitted and more modules may be introduced.

[0129] Figure 4 4 is a schematic flow chart of an image processing method 400 according to an embodiment of the present disclosure. The method 400 may be implemented at the electronic device 100. It should be understood that the method 400 may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0130] In block 410, a cubic panorama is generated from the spherical panorama based on the positional relationship between the spherical model and the cubic model. The electronic device 100 is configured with the spherical model and the cubic model, and the cubic panorama is generated from the spherical panorama. The cubic panorama can be displayed on the screen of the electronic device 100.

[0131] The electronic device 100 can obtain a spherical panorama from a network (e.g., a panorama platform) or from a local storage device. The spherical panorama can be, for example, a spherical panorama with an aspect ratio of 2:1, and can be projected pixel by pixel to a spherical model. In some embodiments, a cubic panorama can be generated from a spherical panorama by an equirectangular projection to perspective algorithm.

[0132] The positional relationship between the spherical model and the cube model can be set to center alignment by default, and can be changed by rotation. Figure 5 As shown, it is a schematic diagram showing the positional relationship between the spherical model and the cube model according to an embodiment of the present disclosure. Figure 5The left side is a standard model of a spherical model and a cubic model, where the centers of the spherical model and the cubic model coincide and their central axes coincide, and the sky of the cubic model is used as the North Pole N of the spherical model, and the ground of the cubic model is used as the South Pole S of the spherical model. In this case, the spherical panorama can be converted into images of the six faces of the cubic model through projection mapping conversion from sphere to cube.

[0133] The positional relationship between the spherical model and the cube model can be changed. If the cube is rotated at a certain angle relative to the spherical surface, the content of the spherical panorama projected onto each face of the cube can be changed, such as Figure 5 As shown on the right. When the cube rotates relative to the spherical model, the centers of the two are kept coincident, and the central axis of rotation can be in any direction. For example, when the spherical model rotates around the NS axis, the four horizontal faces of the cube panorama obtained by projecting the spherical panorama on the cube model will move cyclically. In some embodiments, the user can interact through the screen of the electronic device to change the positional relationship between the spherical model and the cube model, thereby changing the content on each face of the cube panorama.

[0134] In some cases, the target area of ​​the target panorama that the user wishes to modify (for example, an area containing privacy or a display area) may be located on multiple faces of the cube panorama, which may be unfavorable for local modification or replacement. In this case, the positional relationship between the spherical model and the cube model can be adjusted by rotating the cube model. For example, auxiliary lines are displayed on the electronic device 100 to prompt the user of the boundaries of each face of the cube panorama. The user can rotate the cube model relative to the spherical model through the interface interaction of the screen of the electronic device 100, thereby adjusting the positional relationship between the spherical model and the cube model. The electronic device 100 can update the cube panorama in real time according to the adjusted positional relationship, so that the user can preview the effect of the adjustment so as to set the target setting on one face of the cube panorama.

[0135] In block 420, a target area is modified on a face of the cubic panorama. The target area is determined and modified on one or more faces of the cubic panorama displayed by the electronic device 100. The target area may be a privacy-related area, and privacy exposure may be avoided by modifying such an area. The target area may also be a display area, and the display content of the panorama may be enriched by modifying such an area.

[0136] The user can select the target area to be modified on one or more faces of the cube panorama by clicking or selecting a frame on the screen of the electronic device. Alternatively, multiple candidate target areas can be automatically generated for one or more faces of the cube panorama, for example, by an object detection algorithm or by a trained artificial intelligence model, and then the user can select one or more of the areas as the target area to be modified.

[0137] In some embodiments, the target area can be modified by partial replacement, for example, replacing the target area with a pre-prepared map, or replacing the target area with a mosaic. The map can be processed by perspective transformation so that the shape and size are consistent with the target area. Alternatively, the user can also manually edit the target area, for example, the user can add text, manual drawings, partial mosaics, etc. to the target area. The manually edited target area can be rewritten to the original position of the target area on the cube panorama.

[0138] In box 430, the spherical panorama is updated using the modified target area. Through the modification, the cube panorama has been updated, and further, the spherical panorama can be updated according to the updated cube panorama. As mentioned above, the content of the cube panorama depends on the positional relationship between the spherical model and the cube model, so that the pixels of the cube panorama and the pixels of the spherical panorama are mapped to each other using this positional relationship. The electronic device 100 can update the pixels of the modified target area from the cube panorama to the corresponding part of the spherical panorama using the positional relationship. In some embodiments, the electronic device 100 can use the inverse transformation algorithm in step 310 to update the spherical panorama, for example, using a perspective to equirectangular projection algorithm. Then, the electronic device 100 generates an updated 2:1 panorama from the modified target area by pixel alignment according to the projection relationship from the sphere to the 2:1 panorama.

[0139] At this point, the electronic device 100 has achieved partial modification of the panorama, and this modification has achieved real modification of the target area. The user can preview the modified panorama on the electronic device 100. In some embodiments, the electronic device 100 generates another cube panorama based on the positional relationship between the spherical model and the cube model, and presents each face of the other cube panorama. The modified target area can be presented on one face of the cube panorama. The user can also change the positional relationship between the spherical model and the cube model, for example, through a user interface operation, thereby changing the content of each face.

[0140] The following references Figures 6 to 9 Embodiments of the present disclosure are further described.

[0141] Figure 6A schematic diagram of a process for partially modifying a panoramic image according to an embodiment of the present disclosure is shown.

[0142] As shown in the figure, in step 1, the electronic device 100 generates a cube panorama from a spherical panorama (e.g., a standard spherical panorama with an aspect ratio of 2:1) according to the positional relationship between the spherical model and the cube model, and displays a panoramic scene based on the cube panorama on the user interface.

[0143] In some embodiments, the user can determine whether the target area to be partially replaced crosses the surface, that is, whether the target area is located on multiple surfaces of the cube panorama. For example, the user can use the auxiliary lines displayed on the interface to determine whether the target area is located on multiple surfaces.

[0144] In step 2, in response to determining that the target area is located on multiple faces (two faces or more faces) of the cube panorama, the user can adjust the positional relationship between the spherical model and the cube model. In some embodiments, the positional relationship between the two models can be adjusted by selecting the cube model relative to the spherical model. The electronic device 100 can update the cube panorama based on the adjusted positional relationship and present it in real time. The user adjusts the positional relationship between the two models so that the target area is located on one face of the updated cube panorama.

[0145] In some embodiments, the user can specify a point in the target area in the presented cube panorama as the center point of the updated cube panorama, and convert the screen coordinates of the specified point into its spherical coordinates in the spherical panorama through the screen-to-spherical algorithm. The electronic device 100 can adjust the positional relationship between the spherical model and the cube model based on the spherical coordinates. For example, the electronic device 100 can determine the desired positional relationship based on the comparison of the determined spherical coordinates and the spherical coordinates corresponding to the center of the cube face.

[0146] In step 3, a face F of the updated cubic panorama is generated by an equidistant cylindrical perspective projection algorithm. In the face F, the target area to be replaced does not cross the face. The target area may correspond to a rectangular object. In the cubic panorama, the rectangular object after perspective transformation may have a linear shape of a quadrilateral. Compared with the curved shape that the rectangular object may have in the spherical panorama, this linear shape of a quadrilateral is easier to be modified and covered in a relatively simple way.

[0147] In step 4, the user selects a plurality of corner points on the surface F. The target region to be modified can be determined using the corner points. For example, four corner points can be used to determine a target region corresponding to a rectangular shape. It should be noted that the user can select more or fewer corner points to adapt the target region corresponding to various geometric shape objects, not limited to rectangles.

[0148] In some embodiments, a map may be used to cover the target area on the cubic panorama. Specifically, the electronic device 100 may determine the perspective transformation on the surface of the cubic panorama where the target area is located based on multiple corner points of the target area, and based on the determined perspective transformation, generate a perspective picture corresponding to the perspective transformation from the map (e.g., a rectangular map as shown in the figure). The perspective picture may be a perspective map with a transparent background.

[0149] Step 5, paste the perspective map onto the image F to obtain the image F'. The electronic device 100 uses the perspective image to cover the target area. In some embodiments, the electronic device 100 can cover the perspective image onto the face F of the cube panorama by pixel alignment, thereby obtaining the face F'.

[0150] Step 6, project the perspective image F' with the replacement image pasted onto a 2:1 panorama with a transparent background of the same size as the original 2:1 spherical panorama through the inverse transformation from perspective to equidistant cylindrical projection. As mentioned above, the conversion from a spherical panorama to a cubic panorama (equidistant cylindrical projection to perspective) depends on the positional relationship between the spherical model and the cubic model. If the user has adjusted the positional relationship between the models to eliminate the cross-surface problem of the target area, the electronic device will perform pixel writing using the modified target area based on the adjusted positional relationship (corresponding perspective to equidistant cylindrical projection inverse transformation) to update the spherical panorama.

[0151] It should be noted that here the surface F' is projected as a whole onto the spherical panorama. The electronic device 100 may project the surface F' of the cubic panorama as a part of the spherical panorama.

[0152] Step 7, update the spherical panorama using the projected portion of the corresponding surface F'. For example, the electronic device 100 can write the transparent background panorama onto the original 2:1 spherical panorama by pixel alignment, update the spherical panorama, and output the updated 2:1 spherical panorama. The updated spherical panorama completes partial replacement. This partial replacement is a real replacement because the original content has been replaced.

[0153] Step 8, convert the partially replaced 2:1 spherical panorama into 6 faces of another cubic panorama. The face where the target area is located can be selected to replace the original face. In some implementations, if tiling is required, the original tile is replaced with the tile corresponding to the target area after tiling.

[0154] In reference Figure 6The described process has many advantages over traditional solutions. For example, it realizes the real partial replacement of panoramic images, avoiding the risk of privacy leakage; it performs perspective transformation based on a single face of the cubic panorama, reducing the complexity of algorithm implementation; and it significantly improves the efficiency, usability and intuitiveness of partial replacement of panoramic images. In addition, it should be noted that the above steps 1 to 8 can be implemented in real time on electronic devices, and users can preview the panorama and the partial modifications made to the panorama in time during the operation, which provides a good user experience.

[0155] Figure 7 A schematic diagram showing another process for partially modifying a panoramic image according to an embodiment of the present disclosure is shown. Figure 7 The process and Figure 6 The difference is that the perspective image obtained from the mapping is pasted onto a transparent image that is equal to the size of the face of the cube panorama. The other steps are the same as Figure 6 That is, different from Figure 6 Project the entire surface F' onto the spherical panorama, Figure 7 In the process, it is only necessary to project the perspective transformed texture image onto the spherical panorama.

[0156] At this time, the electronic device 100 projects the modified target area as part of the spherical panorama, and updates the spherical panorama using the projected part corresponding to the target area. Based on this approach, the effective pixels contained in the face of the cubic panorama can be minimized. For a high-definition panorama, the resolution of a face of a cubic panorama may be greater than 1000x 1000. After slimming, the performance is significantly improved.

[0157] Figure 8 FIG. 2 is a schematic diagram showing another process for partially modifying a panoramic image according to an embodiment of the present disclosure. Figure 6 and Figure 7 process, Figure 8 The process of solving the cross-surface problem of the target area is to use the horizontal circular shift of the cube panorama at step 2. In this process, the cube model is rotated in the horizontal direction relative to the spherical model to adjust the positional relationship between the cube model and the spherical model. To the user, the four horizontal faces of the cube panorama are like 360-degree circular shifts.

[0158] Since the left and right pixels of the 2:1 spherical panorama are cyclically connected, the target area across the surface of the cube panorama in the horizontal direction can be moved to a certain surface by cyclically shifting the panorama in the horizontal direction, thereby simplifying the processing. Figure 8 The other steps can be followed Figure 6 or Figure 7 is accomplished in the same way.

[0159] Fig. 9 A schematic diagram of another process for local modification of a panorama according to an embodiment of the present disclosure is shown. A method for aligning and replacing pixels in a local area of ​​a panorama based on a rotating cube model and perspective transformation is used to implement online local modification of a panorama, a typical application of which is mosaicing.

[0160] exist Fig. 9 In the process shown, steps 1, 2, and 3 can be combined with Figures 6 to 8 The process is the same. In step 4, the user can select a target area, for example, a rectangular area, on a single face of the cube panorama presented by the device. The electronic device 100 can record the offset coordinates (x, y) and parameters such as width and height w, h of the target area. In step 5, the target area is modified based on user input. The user can perform photo editing operations (such as PS, adding text, mosaic, etc.) in this rectangular area. Steps 6, 7, and 8 are the same as other processes.

[0161] Compared to Figures 6 to 8 The main purpose is to replace the target area of ​​the panorama. Fig. 9 The process enables more flexible and precise modification of local areas.

[0162] It should be noted that the above Figures 6 to 9 The exemplary processes described may be combined in any manner without departing from the scope of protection of the present disclosure.

[0163] References Figures 1 to 9 A scheme for local modification of a panorama according to an embodiment of the present disclosure is described. The scheme implements local modification of the original panorama, so that the original panorama can be truly desensitized, avoiding the disadvantage of "revealing one's true colors", and the method is easy for users to operate and use. In some embodiments, the scheme can perform perspective transformation based on the faces of a cube, which is particularly suitable for rectangular objects with linear perspective transformation relationships, reducing the implementation complexity of the algorithm. In some embodiments, users can also manually modify the content of the cube panorama to achieve precise modification. In addition, the embodiments of the present disclosure can also help users preview the edited images in a timely manner, significantly improving the efficiency and ease of use of local modification of panoramic images.

[0164] Fig.10A schematic block diagram of an image processing apparatus 1000 according to an embodiment of the present disclosure is shown. The image processing apparatus 1000 may be implemented at the electronic device 100. The image processing apparatus 1000 includes a cube panorama generation unit 1010, a modification unit 1020, and a spherical panorama update unit 1030. The cube panorama generation unit 1010 is configured to generate a cube panorama from a spherical panorama based on a positional relationship between a spherical model and a cube model. The modification unit 1020 is configured to modify a target area on one face of the cube panorama. The spherical panorama update unit 1030 is configured to update the spherical panorama using the modified target area.

[0165] In some embodiments, the apparatus 1000 may further include a position relationship adjustment unit (not shown), which may be configured to adjust the position relationship between the spherical model and the cube model in response to the target area being located on multiple faces of the cube panorama. The cube panorama generation unit 1010 may also be configured to update the cube panorama based on the adjusted position relationship. The target area is located on one face of the updated cube panorama.

[0166] In some embodiments, the spherical panoramic image updating unit 1030 may also be configured to update the spherical panoramic image using the modified target area based on the adjusted positional relationship.

[0167] In some embodiments, the position relationship adjustment unit can also be configured to: determine a point in the target area as the center point of a face of the updated cube panorama; determine the spherical coordinates of the point in the spherical panorama; and adjust the position relationship between the spherical model and the cube model based on the spherical coordinates.

[0168] In some embodiments, the position relationship adjustment unit may also be configured to: rotate the cube model relative to the spherical model.

[0169] In some embodiments, the position relationship adjustment unit may also be configured to: rotate the cube model in the horizontal direction relative to the spherical model.

[0170] In some embodiments, the modification unit 1020 may also be configured to: determine the target area by selecting multiple corner points of the target area on the surface; and cover the target area with a map.

[0171] In some embodiments, the modification unit 1020 may also be configured to determine a perspective transformation on a surface based on multiple corner points; generate a perspective picture corresponding to the perspective transformation from a map based on the perspective transformation; and cover the target area with the perspective picture.

[0172] In some embodiments, the target area may correspond to a rectangular object.

[0173] In some embodiments, the modifying unit 1020 may be further configured to: select a target area according to a user input; and modify the target area based on the user input.

[0174] In some embodiments, the modification unit 1020 may be further configured to: project a face of the cubic panorama as a portion of the spherical panorama; and update the spherical panorama using the projected portion corresponding to the face.

[0175] In some embodiments, the modification unit 1020 may further be configured to: update the spherical panorama using the modified target area may include: projecting the modified target area as part of the spherical panorama; and updating the spherical panorama using the projected part corresponding to the target area.

[0176] In some embodiments of the first aspect, the cube panorama generation unit 1010 may also be configured to generate another cube panorama from the updated spherical panorama, the target area being included in one face of the other cube panorama. The apparatus 800 may also include a rendering unit for the other cube panorama.

[0177] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0178] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0179] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0180] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0181] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0182] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0183] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0184] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0185] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. An image processing method, comprising: generating the cubic panorama from the spherical panorama based on the positional relationship between the spherical model and the cubic model; modifying a target region on a face of the cubic panorama; as well as The spherical panorama is updated using the modified target region.

2. The method according to claim 1, further comprising: In response to the target area being located on a plurality of faces of the cubic panorama, adjusting the positional relationship between the spherical model and the cubic model; as well as Based on the adjusted positional relationship, the cubic panorama is updated, and the target area is located on a face of the updated cubic panorama.

3. The method according to claim 2, wherein: Updating the panoramic spherical image using the modified target area includes: Based on the adjusted positional relationship, the spherical panoramic image is updated using the modified target area.

4. The method according to claim 2 or 3, wherein: Adjusting the positional relationship between the spherical model and the cubic model includes: Determine a point in the target area as a center point of a face of the updated cube panorama; determining the spherical coordinates of the point in the spherical panorama; and Based on the spherical coordinates, the positional relationship between the spherical model and the cubic model is adjusted.

5. The method according to any one of claims 2 to 4, wherein: Adjusting the positional relationship between the spherical model and the cubic model includes: The cubic model is rotated relative to the spherical model.

6. The method according to any one of claims 2 to 4, wherein: Adjusting the positional relationship between the spherical model and the cubic model includes: The cube model is rotated in the horizontal direction relative to the spherical model.

7. The method according to any one of claims 1 to 6, wherein: Modifying a target area on a face of the cubic panorama comprises: Determine the target area by selecting a plurality of corner points of the target area on the surface; and Cover the target area with a texture.

8. The method according to claim 7, wherein: Using a map to cover the target area includes: Determining a perspective transformation on the surface based on the plurality of corner points; Based on the perspective transformation, generating a perspective picture corresponding to the perspective transformation from the map; and The target area is covered with the perspective image.

9. The method according to any one of claims 1 to 8, wherein: The target area corresponds to a rectangular object.

10. The method according to any one of claims 1 to 9, wherein: Modifying a target area on a face of the cubic panorama comprises: selecting a target area based on user input; and The target area is modified based on user input.

11. The method according to any one of claims 1 to 10, wherein: Updating the spherical panorama using the modified target area includes: projecting the faces of the cubic panorama as portions of the spherical panorama; and The spherical panorama is updated using the projected portion corresponding to the surface.

12. The method according to any one of claims 1 to 10, wherein: Updating the spherical panorama using the modified target area includes: projecting the modified target area as part of the spherical panorama; and The spherical panorama is updated using the projected portion corresponding to the target area.

13. The method according to any one of claims 1 to 12, further comprising: generating another cubic panorama from the updated spherical panorama, the target area being included in a face of the another cubic panorama; as well as The other cubic panorama is presented.

14. An electronic device comprising: processing unit and memory, The processing unit executes the instructions in the memory so that the electronic device performs a method, the method comprising: generating a cubic panorama from the spherical panorama based on a positional relationship between the spherical model and the cubic model; modifying a target region on a face of the cubic panorama; and The spherical panorama is updated using the modified target region.

15. An image processing device, comprising: a cubic panorama generating unit configured to generate a cubic panorama from the spherical panorama based on a positional relationship between the spherical model and the cubic model; A modification unit configured to modify a target area on a face of the cubic panorama; as well as The spherical panoramic image updating unit is configured to update the spherical panoramic image using the modified target area.

16. A computer-readable storage medium having one or more computer instructions stored thereon, wherein the one or more computer instructions are executed by a processor to cause the processor to perform the method according to any one of claims 1 to 13.

17. A computer program product comprising machine executable instructions which, when executed by a device, cause the device to perform the method according to any one of claims 1 to 13.