Image rendering method based on RTOS system and control device

By segmenting the image into area images and rendering and combining them in static random memory, the problems of slow image rendering speed and screen splitting in RTOS system devices are solved, and the display effect is improved.

CN118887073APending Publication Date: 2024-11-01SHENZHEN OURUIBO ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410891076.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The memory limitations and display capabilities of RTOS system devices are limited, resulting in slow rendering speed of display screens, which are prone to poor display effects such as screen splitting.

Method used

The complete image to be displayed is divided into multiple area images, rendered in static random memory, and the rendered area images are transferred to pseudo-static random memory for combination, and the high processing speed of static random memory is used to improve image rendering efficiency.

Benefits of technology

Through segmentation and combining image processing technology, the efficiency of image rendering is improved, the display screen is avoided, and the display effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887073A_ABST
    Figure CN118887073A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of display, and provides an image rendering method and control equipment based on an RTOS system, and the method comprises the steps: segmenting a to-be-displayed image into a plurality of small region images, and carrying out the rendering of the region images in a static random access memory; and transmitting the rendered area image to a pseudo static random access memory for combination to obtain a rendered complete image. According to the invention, the image rendering efficiency can be improved based on the relatively high processing speed of the static random access memory, so that a display picture is prevented from being split, and the display effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of display technology, and in particular, to an image rendering method and control device based on an RTOS system. Background Art

[0002] In the field of control devices with display screens (e.g., smart switch devices), due to the memory limitations and limited display capabilities of devices using real-time operating systems (RTOS), the rendering speed of the display screen is slow, the display screen is easily fragmented, and other poor display effects. Summary of the invention

[0003] In view of the above, it is necessary to provide an image rendering method and control device based on an RTOS system, which can solve the problems of slow rendering speed of the display screen and easy fragmentation of the display screen.

[0004] An embodiment of the present application provides an image rendering method based on an RTOS system, the method comprising: dividing a complete image to be displayed into multiple regional images according to the capacity of the static random access memory; rendering the multiple regional images in the static random access memory to obtain multiple rendered regional images; transmitting the multiple rendered regional images to the pseudo-static random access memory, and combining the multiple rendered regional images in the pseudo-static random access memory to obtain a rendered complete image.

[0005] In one embodiment, the transmitting the plurality of rendered area images to the pseudo-static random access memory comprises: transmitting the plurality of rendered area images to the pseudo-static random access memory based on direct memory access technology.

[0006] In one embodiment, dividing the complete image to be displayed into multiple regional images according to the capacity of the static random access memory includes: determining a first number of divisions according to the capacity of the static random access memory and the file size of the complete image; dividing the complete image according to the first number of divisions to obtain the multiple regional images.

[0007] In one embodiment, dividing the complete image to be displayed into multiple regional images according to the capacity of the static random access memory includes: dividing the complete image into multiple sub-images according to a preset second division number; if the file size of any sub-image among the multiple sub-images is larger than the capacity of the static random access memory, dividing the any sub-image according to the capacity of the static random access memory to obtain multiple regional images; if the file size of any sub-image is less than or equal to the capacity of the static random access memory, using the any sub-image as the regional image.

[0008] In one embodiment, dividing the complete image to be displayed into multiple regional images according to the capacity of the static random access memory includes: determining a target area of ​​the complete image, the target area including an area with a texture richness greater than a preset threshold; cutting out a target area image corresponding to the target area from the complete image, determining a third number of divisions according to the capacity of the static random access memory and the file size of the target area image, and dividing the target area image according to the third number of divisions to obtain multiple regional images; determining the file size of a non-target area image in the complete image, determining a fourth number of divisions according to the capacity of the static random access memory and the file size of the non-target area image, and dividing the complete image according to the fourth number of divisions to obtain multiple regional images; wherein the non-target area image represents a remaining image after the target area image is cut out from the complete image.

[0009] In one embodiment, the method further includes: determining position information of each of the multiple regional images in the complete image; and rendering the multiple regional images in sequence according to the position information.

[0010] In one embodiment, combining the multiple rendered region images further comprises: determining position information of each region image in the multiple region images in the complete image, and combining the multiple rendered region images according to the position information.

[0011] In one embodiment, after combining the multiple rendered area images, the method further includes: performing image processing on the combined image obtained by combining the multiple rendered area images, and the image processing includes one or more of edge detection, edge fusion, color correction, image denoising, and image enhancement.

[0012] In one embodiment, the method further comprises: displaying the rendered complete image on a display screen of the control device.

[0013] An embodiment of the present application provides an image rendering device based on an RTOS system, the device comprising: an image segmentation module, used to segment a complete image to be displayed into multiple regional images according to the capacity of the static random access memory; an image rendering module, used to render the multiple regional images in the static random access memory to obtain multiple rendered regional images; an image combination module, used to transfer the multiple rendered regional images to the pseudo-static random access memory, and combine the multiple rendered regional images in the pseudo-static random access memory to obtain a rendered complete image.

[0014] An embodiment of the present application provides a control device, which includes a processor and a memory, and the processor is used to implement the image rendering method based on the RTOS system when executing a computer program stored in the memory.

[0015] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the image rendering method based on the RTOS system is implemented.

[0016] In summary, the image rendering method based on the RTOS system described in the present application can divide the image to be displayed into multiple smaller regional images, render the regional images in the static random access memory, and then transfer the rendered regional images to the pseudo-static random access memory for combination to obtain a rendered complete image. Based on the higher processing speed of the static random access memory, the efficiency of image rendering can be improved, thereby avoiding the fragmentation of the display screen and improving the display effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a structural diagram of a control device provided in one embodiment of the present application.

[0018] Figure 2 This is a flowchart of an image rendering method based on an RTOS system provided in one embodiment of the present application.

[0019] Figure 3 This is a flowchart of a method for dividing a complete image to be displayed into multiple regional images provided in one embodiment of the present application.

[0020] Figure 4 This is an example of dividing a complete image into multiple regional images provided by an embodiment of the present application. Figure 1 .

[0021] Figure 5 It is a flowchart of a method for dividing a complete image to be displayed into multiple regional images provided by another embodiment of the present application.

[0022] Figure 6 This is an example of dividing a complete image into multiple regional images provided by an embodiment of the present application. Figure 2 .

[0023] Figure 7 This is a flowchart of a method for dividing a complete image to be displayed into multiple regional images provided by another embodiment of the present application.

[0024] Figure 8 This is an example diagram of a target area provided for an embodiment of the present application.

[0025] Fig. 9 It is a structural diagram of an image rendering device based on an RTOS system provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing the embodiments in one embodiment and are not intended to limit this application.

[0028] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: 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 terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0029] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The following embodiments and features in the embodiments may be combined with each other without conflict.

[0030] In one embodiment, in the field of control devices with display screens, due to the memory limitations and limited display capabilities of devices using real-time operating systems (RTOS), the rendering speed of the display screen is slow, the display screen is easily fragmented, and other poor display effects occur.

[0031] For example, the control device may be a smart switch device with a screen, which can provide users with a convenient, intelligent and personalized experience by integrating features such as intelligent control and display screen. For example, the application scenarios of the smart switch device with a screen may include but are not limited to smart home scenarios, industrial automation scenarios, security monitoring scenarios, etc.

[0032] In one example, in a smart home system, a smart switch device with a screen can be used to control the switch and status adjustment of home electrical appliances such as lights, air conditioners, and televisions. Users can remotely control the smart switch device with a screen through a terminal program (such as an application in a mobile phone), or use a voice assistant (such as a smart home speaker) to voice control the smart switch device with a screen.

[0033] The display screen of the smart switch device with screen can display the environmental information of the user's home (such as temperature and humidity) in real time and display the corresponding rendering picture, which can include an image obtained by rendering a preset image. For example, the rendering picture can include but is not limited to the user's family photos, current weather images, etc.

[0034] Specifically, screen rendering is the process of converting graphic data into images and displaying them on the screen. In smart switchgear with screens, the main reasons for screen rendering are as follows: by rendering graphics, text and other elements, an intuitive and easy-to-understand user interface is formed to facilitate user operation and control; smart switchgear with screens needs to display various status information, parameters, etc. in real time so that users can understand the operation of the equipment at any time. Through screen rendering, this information can be displayed to users in a graphical way; good screen rendering effects can improve the user experience and make the equipment easier to use and understand.

[0035] The memory of the intelligent switch device using the RTOS system is usually small, and the screen display capability of the intelligent switch device using the RTOS system is usually poor. When rendering the screen of the intelligent switch device, the related technology usually puts the screen to be rendered in the pseudo static random access memory (PSRAM). Although the memory of the pseudo static random access memory is large and can meet the rendering requirements of various pictures, the processing speed of the pseudo static random access memory is relatively slow. When the screen displays the user interface, the screen often has poor smoothness of screen rendering.

[0036] In one embodiment, in order to improve the smoothness of image rendering, the image to be rendered can be split into multiple smaller images and placed in a static random-access memory (SRAM) for rendering, and the smaller images rendered by the SRAM are displayed on the display screen of the intelligent switch device. However, this method can only render part of the content of the entire image each time, so the display screen may experience image freezes and screen tearing when displaying the rendered image. For example, a part of the display screen displays the previous smaller image rendered by the SRAM, and then another part of the display screen displays the current smaller image rendered by the SRAM. There is a split area between the above two parts, so the picture appears to be stuck and torn.

[0037] To solve the above problems, the embodiment of the present application provides an image rendering method based on an RTOS system, which can divide the image to be displayed into multiple smaller regional images, render the regional images in a static random access memory, and then transfer the rendered regional images to a pseudo-static random access memory for combination to obtain a rendered complete image. Based on the higher processing speed of the static random access memory, the efficiency of image rendering can be improved, thereby avoiding fragmentation of the displayed image and improving the display effect.

[0038] Figure 1 The schematic diagram of the structure of a control device provided in the embodiment of the present application. The control device 10 can be a mobile phone, a tablet computer, a smart wearable device, an augmented reality (AR) / virtual reality (VR) device, a laptop, a netbook, an energy storage device, a power distribution device, a vehicle-mounted device, a self-moving device, and other control devices. The embodiment of the present application does not impose any restrictions on the specific type of the control device.

[0039] like Figure 1As shown, the control device 10 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104 and a bus 105, and a display screen 106. The processor 103 is coupled to the communication module 101, the memory 102, the I / O interface 104, and the display screen 106 through the bus 105.

[0040] The communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as universal serial bus (USB), controller area network bus (CAN, Controller Area Network). The wireless communication module may provide one or more wireless communication solutions such as wireless fidelity (wireless fidelity, Wi-Fi), bluetooth (bluetooth, BT), mobile communication network, frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.

[0041] The memory 102 may include one or more random access memories (RAMs). The RAMs may be directly read and written by the processor 103, and may be used to store executable programs (such as machine instructions) of an operating system or other running programs, and may also be used to store user and application data.

[0042] In one embodiment, reference Figure 1 As shown, the random access memory may include a static random-access memory 1021 (SRAM) and a pseudo static random access memory 1022 (PSRAM).

[0043] In other embodiments, the random access memory may also include dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0044] The memory 102 may also include one or more non-volatile memories (NVMs). The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 103. The non-volatile memory may include a disk storage device and a flash memory.

[0045] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 103, an image rendering method based on the RTOS system executed on the control device 10 can be implemented.

[0046] In other embodiments, the control device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the control device 10 .

[0047] The processor 103 may include one or more processing units, for example, the processor 103 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, 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.

[0048] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute a computer program stored in the memory 102 to implement the above-mentioned image rendering method based on the RTOS system.

[0049] The I / O interface 104 is used to provide a channel for user input or output. For example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.

[0050] The bus 105 is at least used to provide a channel for mutual communication among the communication module 101 , the memory 102 , the processor 103 , the I / O interface 104 , and the display screen 106 in the control device 10 .

[0051] The display screen 106 may be a touch display device, which may provide a user interface for the user, for example, displaying a rendered complete image in the user interface.

[0052] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the control device 10. In other embodiments of the present application, the control device 10 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.

[0053] refer to Figure 2 FIG. 1 is a flowchart of an image rendering method based on an RTOS system provided in an embodiment of the present application. The image rendering method based on an RTOS system is applied to a control device, such as Figure 1 The control device 10 specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0054] S201, dividing a complete image to be displayed into a plurality of regional images according to the capacity of the static random access memory.

[0055] In one embodiment, in order to improve the image rendering efficiency based on the RTOS system, a static random access memory (SRAM) with faster access speed and lower power consumption may be used to assist image rendering.

[0056] In one embodiment, the complete image may be an image to be displayed in an actual application scenario, and the complete image may be stored in a preset location, for example, a preset location in a pseudo-static random access memory (PSRAM) with a relatively large capacity. The image parameters of the complete image are known data, for example, the image parameters of the complete image may include but are not limited to file size, resolution, image size, etc.

[0057] In one embodiment, the capacity of the SRAM is relatively small, for example, the capacity of the SRAM may be 1Mb, 2Mb, 4Mb, 8Mb, etc. According to the capacity of the SRAM, the complete image to be displayed may be divided into multiple regional images, so that the SRAM can render images for smaller regional images.

[0058] In one embodiment, a variety of methods may be used to segment the complete image to be displayed into a plurality of regional images, for example, Figure 3As shown, it is a flowchart of a method for dividing a complete image to be displayed into multiple regional images provided in an embodiment of the present application, which specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0059] S301, determining a first number of divisions according to the capacity of the static random access memory and the file size of the complete image.

[0060] In one embodiment, the first number of divisions may be determined according to the ratio of the file size of the complete image to the capacity of the static random access memory, for example, represents a rounding-up function, a represents a preset parameter greater than 1, for example, a=1.5, a=2, a=3, which can be set according to actual needs, and this application does not make any specific restrictions on this.

[0061] In one example, image file size / SRAM capacity=7.8, a=2, and the first division number=16.

[0062] By setting parameter a, the inconsistency of the file size of the segmented regional image caused by the inconsistency of the pixel density in the complete image can be taken into account. For example, the larger the pixel density of the region in the complete image, the larger the file size of the segmented region. By setting parameter a, the first segmentation number can be set to a larger value as much as possible, thereby ensuring that the file size of the regional image obtained by subsequent segmentation is smaller than the capacity of the SRAM.

[0063] S302, segmenting the complete image according to a first segmentation quantity to obtain a plurality of regional images.

[0064] In one embodiment, the complete image may be evenly divided according to the first number of divisions, thereby ensuring that the file size of the obtained regional image is smaller than the capacity of the SRAM, making it easier for the SRAM to render the regional image.

[0065] For example, for the first segmentation number N, two integers n and m can be determined so that their product n×m is greater than or equal to N, and the absolute value of the difference between n and m |nm| is as small as possible. In this way, the points for equally dividing the long side and the wide side of the complete image can be determined based on the values ​​of n and m, so that the complete image can be evenly divided into n×m or m×n regional images. Specifically, the position of the segmentation line can be determined according to the positions of the points for equally dividing the long side and the wide side, so as to achieve an even segmentation of the complete image in both the length and width dimensions as much as possible.

[0066] In one example, if N=16, then a=4 and b=4 are a pair of integers that satisfy the above conditions, and the complete image can be divided into 4×4 regional images. Figure 4As shown in FIG. 1 , an example of dividing a complete image into multiple regional images provided in an embodiment of the present application is shown in FIG. Figure 1 , where the dotted line represents the dividing line.

[0067] In another example, if N=17, the product of the two integers closest to and greater than or equal to 17 is 20=4×5. Although 18=3×6 also meets the condition, the difference between 4 and 5 is smaller, so it is more preferred to divide the complete image into 4×5 regional images.

[0068] Through the above embodiment, relatively simple steps can be used to quickly determine the first number of divisions, quickly divide the complete image according to the first number of divisions, and ensure that the file size of the regional image obtained by dividing the complete image is smaller than the capacity of the SRAM, thereby improving image rendering efficiency.

[0069] refer to Figure 5 As shown, it is a flowchart of a method for dividing a complete image to be displayed into multiple regional images provided in another embodiment of the present application, which specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0070] S501: Segment a complete image into a plurality of sub-images according to a preset second segmentation number.

[0071] In one embodiment, the second number of divisions may be determined according to the ratio of the file size of the complete image to the capacity of the static random access memory, for example, in, In one example, image file size / SRAM capacity=7.8, and the second division number=8.

[0072] In one embodiment, the complete image may be evenly divided according to the second number of divisions to obtain a plurality of sub-images. For details, reference may be made to the method of evenly dividing the complete image according to the first number of divisions in S302. In one example, the second number of divisions = 8, and the complete image is evenly divided into 3×3 = 9 sub-images.

[0073] S502, determine whether the file size of any sub-image among the multiple sub-images is larger than the capacity of the static random access memory. If the file size of any sub-image among the multiple sub-images is larger than the capacity of the static random access memory, execute S503; or, if the file size of any sub-image is less than or equal to the capacity of the static random access memory, execute S504.

[0074] In one embodiment, since the second number of divisions does not take into account the different pixel densities of various regions in the complete image, the sub-images obtained by averaging the complete image according to the second number of divisions may have a sub-image whose file size is larger than the capacity of the SRAM due to its large pixel density, and the SRAM cannot be used to render such sub-images. Therefore, the file size of the sub-image can be judged to determine whether the sub-image can be used as a regional image that can be rendered using the SRAM.

[0075] In one example, a complete image is evenly divided into 9 sub-images, wherein the file sizes of 8 sub-images are smaller than or equal to the capacity of the SRAM, and the file size of 1 sub-image is larger than the capacity of the SRAM.

[0076] S503, dividing any sub-image according to the capacity of the static random access memory to obtain multiple regional images.

[0077] In one embodiment, for a sub-image whose file size is larger than the capacity of the SRAM, it can be further segmented, and the image after the sub-image segmentation is used as the regional image.

[0078] In one embodiment, the number of sub-images to be further divided can be determined according to the file size of the sub-images and the capacity of the SRAM, and then the sub-images can be divided according to the number of sub-images. For details, please refer to the description in S301 and S302, so as to ensure that the file size of the image after the sub-images are divided is smaller than the capacity of the SRAM.

[0079] In one example, the number of segmentations corresponding to a sub-image whose file size is larger than the capacity of the SRAM is: The sub-image whose file size is larger than the capacity of the SRAM is divided into 2×2=4 area images.

[0080] S504: Use any sub-image as a regional image.

[0081] In one embodiment, for a sub-image whose file size is less than or equal to the capacity of the SRAM, it can be directly used as a regional image and rendered using the SRAM.

[0082] In one embodiment, since the number of sub-images whose file size is larger than the capacity of the SRAM is small, even if such sub-images are further segmented, the total number of segmentations of the complete image will still be small, for example, less than the first preset number in S301.

[0083] In one example, for example Figure 6 As shown in FIG. 1 , an example of dividing a complete image into multiple regional images provided in an embodiment of the present application is shown in FIG. Figure 2The complete image is evenly divided into 9 sub-images, of which 8 sub-images have file sizes less than or equal to the capacity of the SRAM, and 1 sub-image has a file size greater than the capacity of the SRAM (e.g. Figure 6 The sub-image of the central area of ​​the complete image in the image is divided into 2×2=4 regional images if the file size is larger than the capacity of the SRAM. In this way, the complete image is divided into 8+4=12 regional images.

[0084] Through the above embodiment, the number of segmentations of a relatively small image can be determined, and while the number of obtained regional images is small, the file size of the regional images obtained by segmenting the complete image can be ensured to be smaller than the capacity of the SRAM, thereby improving image rendering efficiency.

[0085] refer to Figure 7 As shown, it is a flowchart of a method for dividing a complete image to be displayed into multiple regional images provided in another embodiment of the present application, which specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0086] S701, determining a target area of ​​a complete image, where the target area includes an area whose texture richness is greater than a preset threshold.

[0087] In one embodiment, a region with greater texture richness in a complete image generally requires more data (e.g., higher resolution or finer color information) to accurately represent it, so the file size of the corresponding region cut out may be larger. Therefore, by determining the texture richness of each region in the complete image, the region greater than a preset threshold can be determined as the target region. The file size of the target region is generally larger, and the target region can be divided into a larger number of smaller images as much as possible, so that SRAM can be used for image rendering.

[0088] In one embodiment, one or more texture analysis methods can be selected to quantify the texture richness of each pixel or region in the complete image. For example, the texture analysis method includes but is not limited to calculating the Gray-Level Co-occurrence Matrix (GLCM), Local Binary Patterns (LBP), gradient histogram, etc. The texture richness map or matrix corresponding to the complete image can be determined based on the texture analysis method, wherein the value of each pixel or region represents its texture richness. According to the texture richness map or matrix, one or more thresholds can be set to distinguish regions with different texture richness, and these thresholds can be used to divide the image into multiple regions, each region corresponding to a specific texture richness range, and the region greater than the preset threshold is used as the target region, and the position of the target region in the complete image is determined.

[0089] In one embodiment, the target region may be a region with an irregularly shaped border determined based on texture richness, and the target region with an irregularly shaped border may be further processed to obtain an updated target region with a regular shape. For example, the region within the minimum circumscribed rectangle surrounding the target region may be determined as the updated target region, or the region within the maximum inscribed rectangle of the target region may be determined as the updated target region.

[0090] For example Figure 8 , which is an example diagram of a target area provided by an embodiment of the present application, wherein the area within the dotted line enclosed figure represents the target area, and the area within the minimum circumscribed rectangle of the dotted line enclosed figure is the updated target area.

[0091] S702, cutting out a target area image corresponding to the target area from the complete image, determining a third segmentation number according to the capacity of the static random access memory and the file size of the target area image, and segmenting the target area image according to the third segmentation number to obtain a plurality of area images.

[0092] In an example, the file size of the target region image obtained by cutting from the complete image is generally large, and the third number of divisions can be determined according to the ratio of the file size of the target region image to the capacity of the static random access memory. The target region image is evenly divided according to the third number of divisions to obtain a plurality of region images. Specifically, reference can be made to the description in S301 and S302.

[0093] By using the third number of divisions, the target region image can be divided into a greater number of region images as much as possible, thereby ensuring that the region images obtained by dividing the target region image can be rendered using SRAM.

[0094] In addition, dividing the target area into a larger number of regional images for image rendering can improve the rendering effect of each regional image, thereby improving the image rendering effect of the target area, so that the rendering picture corresponding to the rendered target area can better display the corresponding texture features.

[0095] S703, determining the file size of the non-target area image in the complete image, determining a fourth segmentation number according to the capacity of the static random access memory and the file size of the non-target area image, and segmenting the complete image according to the fourth segmentation number to obtain multiple area images.

[0096] In one example, the non-target region image represents the remaining image after the target region image is cut out from the complete image, and the boundary of the complete image may be used as the outer boundary of the non-target region image, so that the non-target region image has a regular boundary shape.

[0097] The texture richness in the non-target area image is relatively small, and the fourth segmentation number can be determined according to the ratio of the file size of the non-target area image to the capacity of the static random access memory (refer to the description in S501), so that the non-target area image is evenly segmented according to the fourth segmentation number.

[0098] Through the fourth number of divisions, non-target area images with less texture richness can be divided into a smaller number of area images. While ensuring that the area images obtained by segmenting the non-target area images can use SRAM for image rendering, the number of area images is reduced, thereby improving the efficiency of image rendering.

[0099] In one example, after the complete image to be displayed is divided into a plurality of regional images, the position information of each of the plurality of regional images in the complete image may be determined. For example, the position information may include, but is not limited to, position coordinates (e.g., the coordinates of the center point of the regional image in the coordinate system where the complete image is located) and position numbers (e.g., numbering in the order from left to right and from top to bottom in the complete image).

[0100] S202, rendering a plurality of regional images in a static random access memory to obtain a plurality of rendered regional images.

[0101] In one instance, multiple area images can be rendered in sequence according to location information. For example, the area images can be transferred to a static random access memory in order of the size of the position numbers, and the area images can be rendered using preset rendering tools and rendering parameters (such as resolution, frame rate, special effects, etc.). This application does not impose specific restrictions on rendering tools and rendering parameters.

[0102] Through the above embodiments, the static random access memory can be used to improve the image rendering efficiency.

[0103] S203, transmitting the multiple rendered regional images to a pseudo-static random access memory, combining the multiple rendered regional images in the pseudo-static random access memory to obtain a rendered complete image.

[0104] In one example, multiple rendered area images can be transferred to a pseudo-static random access memory (PSRAM) based on direct memory access (DMA) technology, and the multiple rendered area images can be combined in the larger memory PSRAM to obtain a rendered complete image.

[0105] Specifically, when the RTOS system starts or before the image needs to be transferred, the DMA controller can be initialized and its working mode and parameters can be set. The source address of the DMA controller is set to the starting address of the rendered area image in the SRAM, and the target address is set to the specified address of the PSRAM. According to the file size and type of the rendered area image (such as color depth, resolution, etc.), configure the transfer size and type of the DMA controller. When the rendered area image is to be transferred to the PSRAM, a DMA request is issued to the DMA controller to start the data transfer. The DMA controller takes over the data transfer process, directly reads the rendered area image from the SRAM, and writes it to the PSRAM through the bus.

[0106] After transferring multiple rendered region images to PSRAM using DMA technology, the data in PSRAM can be checked to ensure that the transfer is correct.

[0107] Through the above embodiments, multiple rendered regional images can be transferred to PSRAM based on DMA technology, thereby improving data transmission efficiency and reliability, and further improving image processing efficiency and performance.

[0108] In one example, multiple rendered regional images can be combined according to the position information of each regional image in the complete image, wherein the combination process can be understood as an image stitching process, which can ensure that the regional images are combined according to the corresponding positions in the complete image, thereby avoiding errors in the combination.

[0109] In one example, after combining multiple rendered area images, image processing may be performed on the combined image obtained by combining the multiple rendered area images. The image processing includes but is not limited to one or more of edge detection, edge fusion, color correction, image denoising, and image enhancement.

[0110] Through the above image processing, the quality, visual effects and readability of the image can be significantly improved. These processing steps can be selected and adjusted according to actual needs to achieve the best visual effect and performance balance. In addition, it is worth noting that when performing image processing, it should be ensured that the selection of algorithms and parameters matches the image content and application scenarios to avoid introducing unnecessary distortion or artifacts. At the same time, since image processing usually involves a lot of calculations, the efficiency and real-time performance of the algorithm also need to be considered to ensure that the performance requirements can be met in practical applications.

[0111] In one example, the rendered complete image may be displayed on a display screen of the control device.

[0112] The image rendering method based on the RTOS system provided in the embodiment of the present application can divide the image to be displayed into multiple smaller regional images, render the regional images in the static random access memory, and then transfer the rendered regional images to the pseudo-static random access memory for combination to obtain the rendered complete image. Based on the higher processing speed of the static random access memory, the efficiency of image rendering can be improved, thereby avoiding the fragmentation of the display screen and improving the display effect.

[0113] Fig. 9 It is a structural diagram of an image rendering device based on an RTOS system provided in one embodiment of the present application.

[0114] In some embodiments, the image rendering device 120 based on the RTOS system may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the image rendering device 120 based on the RTOS system may be stored in the memory of the control device and executed by at least one processor to perform (see Figure 2 Description) Image rendering functions based on RTOS system.

[0115] In this embodiment, the image rendering device 90 based on the RTOS system can be divided into multiple functional modules according to the functions performed. The functional modules may include: an image segmentation module 901, an image rendering module 902, and an image combination module 903. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functional implementation method of each module in the image rendering device 90 based on the RTOS system can refer to the above definition of the image rendering method based on the RTOS system, and will not be repeated here.

[0116] The image segmentation module 901 is used to segment the complete image to be displayed into a plurality of regional images according to the capacity of the static random access memory;

[0117] The image rendering module 902 is used to render the multiple regional images in the static random access memory to obtain multiple rendered regional images;

[0118] The image combination module 903 is used to transfer the multiple rendered regional images to the pseudo-static random access memory, and combine the multiple rendered regional images in the pseudo-static random access memory to obtain a rendered complete image.

[0119] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.

[0120] The computer-readable storage medium may be an internal memory of the control device described in the above embodiment, such as a hard disk or memory of the control device. The computer-readable storage medium may also be an external storage device of the control device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the control device.

[0121] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the control device, etc.

[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0123] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0124] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0126] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An image rendering method based on RTOS system, applied to control equipment, It is characterized in that The control device includes a static random access memory and a pseudo-static random access memory, and the method includes: According to the capacity of the static random access memory, the complete image to be displayed is divided into a plurality of regional images; Rendering the plurality of regional images in the static random access memory to obtain a plurality of rendered regional images; The multiple rendered regional images are transmitted to the pseudo-static random access memory, and the multiple rendered regional images are combined in the pseudo-static random access memory to obtain a rendered complete image.

2. The image rendering method based on the RTOS system according to claim 1, It is characterized in that The transmitting the plurality of rendered regional images to the pseudo-static random access memory comprises: Based on direct memory access technology, the plurality of rendered regional images are transmitted to the pseudo-static random access memory.

3. The image rendering method based on the RTOS system according to claim 1, It is characterized in that The step of dividing the complete image to be displayed into a plurality of regional images according to the capacity of the static random access memory comprises: Determining a first number of divisions according to the capacity of the static random access memory and the file size of the complete image; The complete image is segmented according to the first segmentation quantity to obtain the multiple regional images.

4. The image rendering method based on the RTOS system according to claim 1, It is characterized in that The step of dividing the complete image to be displayed into a plurality of regional images according to the capacity of the static random access memory comprises: Dividing the complete image into a plurality of sub-images according to a preset second number of divisions; If the file size of any sub-image among the plurality of sub-images is larger than the capacity of the static random access memory, segmenting the any sub-image according to the capacity of the static random access memory to obtain a plurality of the regional images; If the file size of any sub-image is smaller than or equal to the capacity of the static random access memory, any sub-image is used as the regional image.

5. The image rendering method based on RTOS system according to claim 1, It is characterized in that The step of dividing the complete image to be displayed into a plurality of regional images according to the capacity of the static random access memory comprises: Determine a target area of ​​the complete image, wherein the target area includes an area whose texture richness is greater than a preset threshold; Cutting the target region image corresponding to the target region from the complete image, determining a third segmentation number according to the capacity of the static random access memory and the file size of the target region image, and segmenting the target region image according to the third segmentation number to obtain a plurality of region images; Determine the file size of the non-target area image in the complete image, determine the fourth segmentation number according to the capacity of the static random access memory and the file size of the non-target area image, and segment the complete image according to the fourth segmentation number to obtain multiple area images; wherein the non-target area image represents the remaining image after the target area image is cut out from the complete image.

6. The image rendering method based on RTOS system according to claim 1, It is characterized in that The method further comprises: Determine position information of each of the plurality of regional images in the complete image; The plurality of area images are rendered in sequence according to the position information.

7. The image rendering method based on RTOS system according to claim 1, It is characterized in that The combining of the plurality of rendered region images further comprises: Determine the position information of each of the multiple region images in the complete image, and combine the multiple rendered region images according to the position information.

8. The image rendering method based on RTOS system according to claim 1, It is characterized in that After combining the plurality of rendered region images, the method further comprises: Performing image processing on a combined image obtained by combining the multiple rendered regional images, wherein the image processing includes one or more of edge detection, edge fusion, color correction, image denoising, and image enhancement.

9. The image rendering method based on RTOS system according to claim 1, It is characterized in that The method further comprises: The rendered complete image is displayed on a display screen of the control device.

10. A control device, It is characterized in that The control device comprises a processor and a memory, and when the processor executes a computer program stored in the memory, the image rendering method based on the RTOS system as claimed in any one of claims 1 to 9 is implemented.