Camera off-screen rendering method and device, equipment and storage medium

Through the camera off-screen rendering method, the filter shader is used to process data to generate image objects, and the external texture objects of the Flutter graphics frame are updated, which solves the problem that camera preview frames cannot be rendered uniformly in OpenHarmony system, and realizes the real-time preview effect of camera applications and Efficient rendering.

CN118945486APending Publication Date: 2024-11-12HUNAN KAIHONG ZHIGU DIGITAL IND DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410920723.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The camera preview frames in OpenHarmony system cannot be rendered and displayed on the screen in Flutter, resulting in the real-time preview effect of camera applications on the market.

Method used

The camera off-screen rendering method is adopted, and the data is processed using the filter shader and stored in the preset frame buffer, image objects are generated, and the external texture objects of the Flutter graphics frame are updated to realize the on-screen display.

Benefits of technology

Without using OpenHarmony's native components, the image frame filter shader is used to process data to generate image objects, update the external texture objects of the Flutter graphics framework, realize unified rendering and on-screen display of camera applications, and improve rendering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945486A_ABST
    Figure CN118945486A_ABST
Patent Text Reader

Abstract

The invention discloses a camera off-screen rendering method and device, equipment and a storage medium. The method comprises the following steps: generating filter shader processing data by using a filter shader and an image frame, and storing the filter shader processing data into a preset frame buffer area; reading the filter shader processing data from the preset frame buffer area, and generating a picture object according to the filter shader processing data; and updating an external texture object of the Flutter graphic framework by using the picture object to obtain target external texture data, and performing on-screen display by using the target external texture data. According to the technical scheme, a native component of OpenHarmony does not need to be used, and on-screen display can be achieved through the updated external texture in the Flutter graphic frame.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a camera off-screen rendering method, device, equipment and storage medium. Background Art

[0002] Currently, many special effects in camera applications require the use of filters, such as black and white, pixelation, sharpening, saturation and other stylized effects. Today, the real-time preview effects of camera applications on the market are achieved through preview frame processing algorithms or shaders. The Flutter framework is an open source cross-platform application development framework. Flutter's camera filter library flutter_gpu_image can implement camera filter processing views on iOS and Android platforms.

[0003] However, the Flutter graphics framework uniformly renders page elements usually on the same layer, but the camera preview frames in the OpenHarmony system cannot be uniformly rendered and displayed on the screen in Flutter after being processed by the filter shader. Summary of the invention

[0004] The present invention provides a camera off-screen rendering method, device, equipment and storage medium to solve the problem that camera preview frames in an OpenHarmony system cannot be uniformly rendered in Flutter.

[0005] In a first aspect, the present invention provides a camera off-screen rendering method, which is applied to a target camera application of an open source Hongmeng system OpenHarmony, and the method comprises:

[0006] Generate filter shader processing data using the filter shader and the image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in the Flutter framework;

[0007] Reading the filter shader processing data from the preset frame buffer, and generating a picture object according to the filter shader processing data;

[0008] The image object is used to update the external texture object of the Flutter graphics framework to obtain target external texture data, and the target external texture data is used for on-screen display.

[0009] In a second aspect, the present invention provides a camera off-screen rendering device, which is applied to a target camera application of an open source Hongmeng system OpenHarmony, and the device includes:

[0010] An image frame processing module, used to generate filter shader processing data using a filter shader and an image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in a Flutter framework;

[0011] A picture object generation module, used for reading the filter shader processing data from the preset frame buffer, and generating a picture object according to the filter shader processing data;

[0012] The on-screen display module is used to update the external texture object of the Flutter graphics framework using the picture object to obtain target external texture data, and use the target external texture data for on-screen display.

[0013] In a third aspect, the present invention provides an electronic device, the electronic device comprising:

[0014] at least one processor;

[0015] and a memory communicatively coupled to the at least one processor;

[0016] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the camera off-screen rendering method of the first aspect mentioned above.

[0017] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the camera off-screen rendering method of the first aspect when executed.

[0018] The camera off-screen rendering solution provided by the present invention utilizes filter shaders and image frames to generate filter shader processing data, and stores the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in the Flutter framework, reads the filter shader processing data from the preset frame buffer, generates a picture object based on the filter shader processing data, uses the picture object to update the external texture object of the Flutter graphics framework to obtain the target external texture data, and uses the target external texture data for on-screen display. By adopting the above technical solution, the filter shader processing data of the image frame in the Flutter camera application is used to generate a picture object, and then the picture object is used to update the external texture object of the Flutter graphics framework, without using the native components of OpenHarmony, the data of the updated external texture object can be used to achieve on-screen display.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flowchart of a camera off-screen rendering method provided according to Embodiment 1 of the present invention;

[0022] Figure 2 is a flowchart of a camera off-screen rendering method provided according to Embodiment 2 of the present invention;

[0023] Figure 3 is a structural schematic diagram of a camera off-screen rendering device provided according to Embodiment 3 of the present invention;

[0024] Figure 4 It is a structural schematic diagram of an electronic device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes 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. The character " / " generally indicates that the objects associated before and after are an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Embodiment 1

[0028] Figure 1 A flowchart of a camera off-screen rendering method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of performing Flutter camera off-screen rendering in the open source Hongmeng system OpenHarmony. The method can be applied to the target camera application of the open source Hongmeng system OpenHarmony and executed by a camera off-screen rendering device. The camera off-screen rendering device can be implemented in the form of hardware and / or software. The camera off-screen rendering device can be configured in an electronic device, which can be composed of two or more physical entities or one physical entity.

[0029] like Figure 1 As shown, a camera off-screen rendering method provided in the first embodiment of the present invention specifically includes the following steps:

[0030] S101. Generate filter shader processing data using a filter shader and an image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in a Flutter framework.

[0031] In this embodiment, the preview image stream can be obtained, and the filter shader inside the target camera application is used to process the image frames in the preview image stream, thereby obtaining shader processing data. Off-screen rendering is a graphics rendering technology that involves saving the rendering results in an invisible buffer instead of directly displaying them on the screen.

[0032] S102: Read the filter shader processing data from the preset frame buffer, and generate a picture object according to the filter shader processing data.

[0033] In this embodiment, when it is necessary to display an image corresponding to the filter shader processed data, the processed data can be read from a preset frame buffer and a picture object can be generated.

[0034] S103. Use the picture object to update the external texture object of the Flutter graphics framework to obtain target external texture data, and use the target external texture data for on-screen display.

[0035] In this embodiment, the picture object can be passed into the Flutter graphics framework of the target camera application, and the external texture object of the Flutter graphics framework can be updated using the picture object to obtain new external texture data, that is, the target external texture data. The target external texture data can be rendered to achieve on-screen display.

[0036] The camera off-screen rendering method provided by the embodiment of the present invention uses filter shaders and image frames to generate filter shader processing data, and stores the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in the Flutter framework, reads the filter shader processing data from the preset frame buffer, generates a picture object according to the filter shader processing data, uses the picture object to update the external texture object of the Flutter graphics framework to obtain the target external texture data, and uses the target external texture data for on-screen display. The technical solution of the embodiment of the present invention uses the filter shader processing data of the image frame in the Flutter camera application to generate a picture object, and then uses the picture object to update the external texture object of the Flutter graphics framework, without using the native components of OpenHarmony, and the data of the updated external texture object can be used to achieve on-screen display.

[0037] Optionally, before reading the filter shader processing data from the preset frame buffer, the method includes: performing a frame event synchronization operation on the image frame.

[0038] Optionally, generating a picture object according to the filter shader processed data includes: performing color format conversion processing on the filter shader processed data to obtain conversion data; and decoding the conversion data to obtain the picture object.

[0039] Specifically, color format conversion mainly includes converting one color mode into another color mode.

[0040] Embodiment 2

[0041] Figure 2 This is a flowchart of a camera off-screen rendering method provided in Embodiment 2 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and a specific method for rendering and applying image frames of a Flutter camera application is given.

[0042] Optionally, the use of filter shaders and image frames to generate filter shader processing data includes: obtaining each image frame in the preview image stream, and generating external texture data based on the image frame; and performing shading and rendering processing on the external texture data of each image frame using a filter shader according to preset filter parameters to generate filter shader processing data.

[0043] Optionally, before using the picture object to update the external texture object of the Flutter graphics framework to obtain the target external texture data, it also includes: passing the picture object as an input parameter to the Flutter graphics framework.

[0044] Optionally, the using the target external texture data for on-screen display includes: uniformly rendering the target external texture data to a Flutter texture component for on-screen display.

[0045] like Figure 2 As shown, a camera off-screen rendering method provided by Embodiment 2 of the present invention specifically includes the following steps:

[0046] S201, acquiring each image frame in a preview image stream, and generating external texture data according to the image frame.

[0047] Specifically, the camera preview frame acquisition module, off-screen rendering module, and image decoding module can be pre-arranged in the target camera application of the open source Hongmeng system OpenHarmony. The camera preview frame acquisition module can use the open graphics library OpenGL to generate external texture data of the image frame. Among them, texture can be understood as mapping an image or pattern onto the surface of a 3D model to increase the details and realism of the graphics.

[0048] S202: Performing shading and rendering processing on the external texture data of each of the image frames using a filter shader according to preset filter parameters to generate filter shader processed data.

[0049] Optionally, the filter shader includes: an open graphics library OpenGL shader.

[0050] Specifically, the off-screen rendering module can use the OpenGL shader to perform shading and rendering processing on the external texture data of each image frame according to preset filter parameters, thereby obtaining filter shader processing data.

[0051] S203: storing the filter shader processed data into a preset frame buffer.

[0052] S204: Read the filter shader processing data from the preset frame buffer, and perform color format conversion processing on the filter shader processing data to obtain conversion data.

[0053] Specifically, the off-screen rendering module may read the filter shader processing data from the preset frame buffer, and perform color format conversion processing on the filter shader processing data to obtain conversion data.

[0054] S205: Decode the conversion data to obtain a picture object.

[0055] Specifically, the image decoding module may decode the conversion data to obtain a picture object.

[0056] S206: Pass the picture object as an input parameter into the Flutter graphics framework.

[0057] S207. Use the picture object to update the external texture object of the Flutter graphics framework to obtain target external texture data.

[0058] S208. Render the target external texture data uniformly to the Flutter texture component for on-screen display.

[0059] The camera off-screen rendering method provided in an embodiment of the present invention uses an external texture as a bridge to connect the preview image frame of the Flutter camera application in OpenHarmony and the Flutter graphics framework, so that the Flutter texture component can render the preview image at the same layer of the application page, which is more efficient than rendering using the native UI component in OpenHarmony.

[0060] Embodiment 3

[0061] Figure 3 This is a schematic diagram of the structure of a camera off-screen rendering device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device is applied to the target camera application of the open source Hongmeng system OpenHarmony, and the device includes: an image frame processing module 301, a picture object generation module 302 and an upper screen display module 303, wherein:

[0062] An image frame processing module, used to generate filter shader processing data using a filter shader and an image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in a Flutter framework;

[0063] A picture object generation module, used for reading the filter shader processing data from the preset frame buffer, and generating a picture object according to the filter shader processing data;

[0064] The on-screen display module is used to update the external texture object of the Flutter graphics framework using the picture object to obtain target external texture data, and use the target external texture data for on-screen display.

[0065] The camera off-screen rendering device provided by an embodiment of the present invention uses the filter shader of the image frame in the Flutter camera application to process data to generate a picture object, and then uses the picture object to update the external texture object of the Flutter graphics framework. There is no need to use the native components of OpenHarmony, and the data of the updated external texture object can be used to achieve on-screen display.

[0066] Optionally, the image frame processing module includes:

[0067] An external texture generation unit, used for acquiring each image frame in the preview image stream and generating external texture data according to the image frame;

[0068] The shader processing unit is used to perform shading and rendering processing on the external texture data of each image frame using a filter shader according to preset filter parameters to generate filter shader processing data.

[0069] Optionally, the device further comprises:

[0070] A parameter transmission module is used to transmit the picture object as an input parameter to the Flutter graphics framework before using the picture object to update the external texture object of the Flutter graphics framework to obtain target external texture data.

[0071] Optionally, the upper screen display module includes:

[0072] The rendering unit is used to uniformly render the target external texture data to the Flutter texture component for on-screen display.

[0073] Optionally, the device further comprises:

[0074] A synchronization module is used to perform a frame event synchronization operation on the image frame before reading the filter shader processing data from the preset frame buffer.

[0075] Optionally, the picture object generation module includes:

[0076] A color conversion unit, used for performing color format conversion processing on the filter shader processing data to obtain conversion data;

[0077] A decoding unit is used to decode the conversion data to obtain a picture object.

[0078] Optionally, the filter shader includes: an open graphics library OpenGL shader.

[0079] The camera off-screen rendering device provided in the embodiment of the present invention can execute the camera off-screen rendering method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0080] Embodiment 4

[0081] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The electronic device is installed with the open source Hongmeng system OpenHarmony, in which the target camera application is installed.

[0082] The components shown herein, their connections and relationships, and their functions, are intended to be exemplary only, and are not intended to limit implementations of the inventions described and / or claimed herein.

[0083] like Figure 4 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0084] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0085] The processor 41 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a camera off-screen rendering method.

[0086] In some embodiments, the camera off-screen rendering method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the camera off-screen rendering method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to perform the camera off-screen rendering method in any other appropriate manner (e.g., by means of firmware).

[0087] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0088] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0089] The computer device provided above can be used to execute the camera off-screen rendering method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0090] Embodiment 5

[0091] In the context of the present invention, a computer-readable storage medium may be a tangible medium, and the computer-executable instructions are used to perform a camera off-screen rendering method when executed by a computer processor, and the method is applied to a target camera application of the open source Hongmeng system OpenHarmony, and the method includes:

[0092] Generate filter shader processing data using the filter shader and the image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in the Flutter framework;

[0093] Reading the filter shader processing data from the preset frame buffer, and generating a picture object according to the filter shader processing data;

[0094] The image object is used to update the external texture object of the Flutter graphics framework to obtain target external texture data, and the target external texture data is used for on-screen display.

[0095] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by an instruction execution system, device or equipment or used with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0096] The computer device provided above can be used to execute the camera off-screen rendering method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0097] It is worth noting that in the embodiment of the above-mentioned camera off-screen rendering device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0098] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A camera off-screen rendering method, characterized in that: In a target camera application applied to the open source Hongmeng system OpenHarmony, the method includes: Generate filter shader processing data using the filter shader and the image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in the Flutter framework; Reading the filter shader processing data from the preset frame buffer, and generating a picture object according to the filter shader processing data; The image object is used to update the external texture object of the Flutter graphics framework to obtain target external texture data, and the target external texture data is used for on-screen display.

2. The method according to claim 1, characterized in that The step of generating filter shader processing data by using the filter shader and the image frame includes: Obtain each image frame in the preview image stream, and generate external texture data according to the image frame; According to preset filter parameters, the external texture data of each image frame is shaded and rendered using a filter shader to generate filter shader processed data.

3. The method according to claim 1, characterized in that: Before using the picture object to update the external texture object of the Flutter graphics framework to obtain the target external texture data, it also includes: The image object is passed as an input parameter to the Flutter graphics framework.

4. The method according to any one of claims 1 to 3, characterized in that The using the target external texture data to display on the screen includes: The target external texture data is uniformly rendered to the Flutter texture component for on-screen display.

5. The method according to claim 2, characterized in that: Before reading the filter shader processing data from the preset frame buffer, the method includes: A frame event synchronization operation is performed on the image frame.

6. The method according to claim 1, characterized in that The step of processing data according to the filter shader to generate a picture object comprises: Performing color format conversion processing on the filter shader processing data to obtain conversion data; The conversion data is decoded to obtain a picture object.

7. The method according to claim 1, characterized in that The filter shader includes: an open graphics library OpenGL shader.

8. A camera off-screen rendering device, characterized in that: In the target camera application applied to the open source Hongmeng system OpenHarmony, the device includes: An image frame processing module, used to generate filter shader processing data using a filter shader and an image frame, and store the filter shader processing data in a preset frame buffer, wherein the target camera application is a camera application built in a Flutter framework; A picture object generation module, used for reading the filter shader processing data from the preset frame buffer, and generating a picture object according to the filter shader processing data; The on-screen display module is used to update the external texture object of the Flutter graphics framework using the picture object to obtain target external texture data, and use the target external texture data for on-screen display.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the camera off-screen rendering method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the camera off-screen rendering method according to any one of claims 1 to 7 when executed.