Configurable parameter mapping-based camera signal format conversion method, device and terminal

By dynamically defining input and output parameters, parsing and reorganizing the camera signal format, the compatibility and resource waste issues between the camera and the display are resolved, flexible conversion across interfaces and multiple formats is achieved, and development costs and cycles are reduced.

CN120751077APending Publication Date: 2025-10-03上海先楫半导体科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510682746.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

The signal transmission between existing cameras and display screens has poor compatibility, requires the development of dedicated conversion modules, resulting in long cycles and high costs, invalid bits waste resources and cannot be flexibly processed, and have single functions that only support a single interface or fixed format conversion.

Method used

By dynamically defining input and output parameters based on the signal formats supported by the camera and display, parsing and extracting valid components, and recombining them to generate image data that adapts to the specifications of the display, it supports cross-interface and multi-format conversion.

Benefits of technology

It realizes cross-interface and multi-format conversion from any camera signal to display format, and can adapt to any display specification without customized hardware, which improves compatibility, shortens development cycle and saves resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751077A_ABST
    Figure CN120751077A_ABST
Patent Text Reader

Abstract

The invention provides a camera signal format conversion method and device based on configurable parameter mapping and a terminal, and the method comprises the steps: dynamically setting an input parameter and an output parameter according to a signal format supported by an accessed camera and a display screen; and analyzing an input signal transmitted by the camera interface based on the input parameter, extracting an effective component, recombining the effective component according to the output parameter, generating image data adaptive to the specification of the display screen, and outputting and displaying the image data. According to the method, cross-interface and multi-format conversion from any camera signal to the display screen format can be automatically completed by dynamically defining the input and output parameters and mapping the dynamic parameters, any display screen specification can be adapted without customizing hardware, the universality is high, the development period is short, and the problems that in the prior art, compatibility is poor, resources are wasted, and the function is single are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image signal processing, and in particular to a camera signal format conversion method, device and terminal based on configurable parameter mapping. Background Art

[0002] Signal transmission between cameras and displays primarily relies on fixed interface protocols and preset formats. Common interface protocols include DVP and MIPI CSI, while preset formats include RGB565 and YUV422. However, cameras and displays produced by different manufacturers differ significantly in the signal formats they support, making standardization difficult in terms of component bit widths, arrangement order, and the definition of insignificant bits. To ensure proper signal transmission and display, format conversion often requires customized hardware or software. However, this approach has the following drawbacks: First, compatibility is limited. Dedicated conversion modules must be developed to accommodate cameras and displays of varying specifications, significantly extending development cycles and driving up costs. Second, resources are severely wasted, as insignificant bits consume significant transmission bandwidth and storage space, and existing technologies lack the ability to flexibly remove or reconstruct insignificant bits. Third, functionality is limited. Most solutions only support conversion within a single interface or fixed format, such as from RGB to YUV, and struggle to achieve universal conversion across interfaces (such as DVP and MIPI CSI) or between multiple formats (for example, YCbCr to RGB). Summary of the Invention

[0003] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a camera signal format conversion method, device and terminal based on configurable parameter mapping, which is used to solve the technical problems of the existing format conversion technology, such as poor compatibility, the need to develop a dedicated conversion module resulting in a long cycle and high cost, invalid bits that waste resources and cannot be flexibly processed, and a single function that only supports a single interface or fixed format conversion but cannot achieve cross-interface and universal conversion of different formats.

[0004] To achieve the above-mentioned purpose and other related purposes, the present invention provides a camera signal format conversion method based on configurable parameter mapping, the method comprising: dynamically defining input parameters and output parameters according to the signal formats supported by the connected camera and the display screen; based on the defined input parameters, parsing the input signal transmitted through the camera interface and extracting the valid components; based on the defined output parameters, reorganizing the extracted valid components to generate image data adapted to the display screen specifications, so as to output the image data to the display screen for display.

[0005] In one embodiment of the present invention, input parameters are set according to the interface type of the connected camera and the supported signal format; wherein, the input parameters include: input interface type, input interface bit width, input unit pixel transmission times, input unit pixel total bit width, input signal format, input component start and end addresses, and input component invalid bit addresses.

[0006] In one embodiment of the present invention, the input signal transmitted through the camera interface is parsed based on the defined input parameters, and the valid components are extracted, including: receiving the input signal transmitted through the camera interface according to the input interface type, the input interface bit width, the number of input unit pixel transmissions, and the total bit width of the input unit pixel, and identifying each component in combination with the input signal format, the start and end addresses of each input component, and the invalid bit addresses of each input component, and eliminating the invalid bits in each component, and extracting the valid bits of each component.

[0007] In one embodiment of the present invention, output parameters are defined based on the signal format supported by the display screen and the display screen input requirements; wherein the output parameters include: the output signal format, the total bit width of the output unit pixel corresponding to the output signal format, the start and end addresses of each output component, and the invalid bit address of each output component.

[0008] In one embodiment of the present invention, the reorganization of the extracted valid components based on the defined output parameters to generate image data adapted to the specifications of the display screen includes: if the defined input signal format is consistent with the output signal format, the valid bits of each extracted component are rearranged according to the output start and end addresses of each component and the output invalid bit addresses of each component to generate image data that meets the input requirements of the display screen, and the image data is stored in the FIFO to output the image data from the FIFO to the display screen; if the defined input signal format is inconsistent with the output signal format, the color space conversion is performed based on the extracted valid bits of each component to obtain each component of the output signal format, and the components of the converted output signal format are rearranged based on the output start and end addresses of each component and the output invalid bit addresses of each component to generate image data that meets the input requirements of the display screen, and the image data is stored in the FIFO to output the image data from the FIFO to the display screen.

[0009] In one embodiment of the present invention, the output parameters are further provided with special display processing information defined according to the special display requirements of the display screen, so as to perform corresponding processing on the rearranged image data; wherein, the special display processing information includes: one or more of compression information, screenshot information and grayscale processing information.

[0010] In one embodiment of the present invention, if compression information is set in the output parameters, the rearranged image data is compressed based on the sampling rate in the compression information, so that the compressed image data is transmitted to the display screen; if screenshot information is set in the output parameters, the rearranged image data is screenshot-processed based on the screenshot function start pixel and end pixel in the screenshot information, so that the screenshot-processed image data is transmitted to the display screen; if grayscale processing information is set in the output parameters, only the brightness component in the rearranged image data is retained, and the color component is discarded, so that the grayscale-processed image data is transmitted to the display screen.

[0011] In one embodiment of the present invention, the interface types of the connected camera include: DVP and MIPICSI; the signal format types supported by the connected camera and the display screen include: RGB, YUV and YCbCr.

[0012] To achieve the above-mentioned purpose and other related purposes, the present invention provides a camera signal format conversion device based on configurable parameter mapping, the device comprising: a parameter definition module, used to dynamically define input parameters and output parameters according to the signal formats supported by the connected camera and the display screen; a component extraction module, connected to the parameter definition module, used to parse the input signal transmitted through the camera interface based on the defined input parameters and extract valid components; a component recombination module, connected to the component extraction module, used to recombin the extracted valid components based on the defined output parameters, and generate image data adapted to the display screen specifications, so as to output the image data to the display screen for display.

[0013] To achieve the above-mentioned objectives and other related objectives, the present invention provides an electronic terminal, comprising: one or more memories and one or more processors; the one or more memories are used to store computer programs; the one or more processors are connected to the memories and are used to run the computer programs to execute the camera signal format conversion method based on configurable parameter mapping.

[0014] As described above, the present invention is a camera signal format conversion method, device, and terminal based on configurable parameter mapping, which has the following beneficial effects: the present invention dynamically sets input parameters and output parameters based on the signal formats supported by the connected camera and display screen; parses the input signal transmitted by the camera interface based on the input parameters and extracts the valid components, then reorganizes the valid components based on the output parameters to generate image data adapted to the display screen specifications and outputs them for display. By dynamically defining input and output parameters, the present invention can automatically complete cross-interface, multi-format conversion from any camera signal to the display screen format through dynamic parameter mapping. It can adapt to any display screen specification without the need for customized hardware, has strong versatility and a short development cycle, and solves the problems of poor compatibility, waste of resources, and single functionality of existing technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 Shown is a structural diagram of a camera signal format conversion method based on configurable parameter mapping in one embodiment of the present invention.

[0016] Figure 2 Shown is a schematic structural diagram of an input signal in an embodiment of the present invention.

[0017] Figure 3 FIG. 1 is a schematic diagram showing the format of an output RGB565 signal according to an embodiment of the present invention.

[0018] Figure 4 FIG. 1 is a schematic diagram showing the format of an input RGB888 signal in an embodiment of the present invention.

[0019] Figure 5 FIG. 1 is a schematic diagram showing the format of an output YUV422 signal according to an embodiment of the present invention.

[0020] Figure 6 Shown is a schematic structural diagram of two camera signal format conversion devices based on configurable parameter mapping in one embodiment of the present invention.

[0021] Figure 7 Shown is a schematic structural diagram of an electronic terminal in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0023] It should be noted that in the following description, reference is made to the accompanying drawings, which describe several embodiments of the present invention. It should be understood that other embodiments may be used and that mechanical, structural, electrical and operational changes may be made without departing from the spirit and scope of the present invention. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present invention is limited only by the claims of the published patents. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. Spatially related terms, such as "upper", "lower", "left", "right", "below", "below", "lower", "above", "upper", etc., may be used in the text to facilitate the description of the relationship between one element or feature shown in the figure and another element or feature.

[0024] Throughout this specification, when a part is said to be "connected" to another part, this includes not only "direct connection" but also "indirect connection" with other elements interposed therebetween. Furthermore, when a part is said to "include" a certain component, unless otherwise stated, this does not exclude the other component but rather implies that the other component may be included.

[0025] The terms "first," "second," and "third" are used to describe various parts, components, regions, layers, and / or segments, but are not intended to be limiting. These terms are used solely to distinguish one part, component, region, layer, or segment from another. Therefore, a reference to a first part, component, region, layer, or segment below may also refer to a second part, component, region, layer, or segment without departing from the scope of the present invention.

[0026] Furthermore, as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, "A, B, or C" or "A, B, and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B, and C". Exceptions to this definition occur only when the combination of elements, functions, or operations is inherently mutually exclusive in some way.

[0027] The present invention provides a camera signal format conversion method based on configurable parameter mapping. The method dynamically sets input and output parameters based on the signal formats supported by the connected camera and display. The method then analyzes the input signal transmitted by the camera interface based on the input parameters, extracts the valid components, and reassembles the valid components based on the output parameters to generate image data adapted to the display specifications for output and display. By dynamically defining input and output parameters and dynamically mapping parameters, the method can automatically complete cross-interface, multi-format conversion from any camera signal to a display format. This method can adapt to any display specification without custom hardware, offering high versatility and a short development cycle. This method addresses the poor compatibility, resource waste, and limited functionality of existing technologies.

[0028] The following is a detailed description of the embodiments of the present invention with reference to the accompanying drawings so that those skilled in the art can easily implement the present invention. The present invention can be embodied in many different forms and is not limited to the embodiments described herein.

[0029] like Figure 1 A structural schematic diagram showing a camera signal format conversion method based on configurable parameter mapping in an embodiment of the present invention is shown.

[0030] The method comprises:

[0031] Step S1: Dynamically define input parameters and output parameters based on the signal formats supported by the connected camera and display screen.

[0032] Specifically, it connects cameras and displays that require data transmission conversion, ensuring that camera data is formatted and compatible with the display. It automatically matches and defines input / output parameters based on the signal formats supported by the devices on both ends, preventing data transmission failures or display anomalies caused by format incompatibility.

[0033] In one embodiment, the interface type of the connected camera can be a DVP (Digital Video Port) interface, which is a parallel transmission interface widely used in traditional CMOS image sensors. The data transmitted by this interface includes pixel data (such as RGB, YUV format), synchronization signals (horizontal synchronization HSYNC, field synchronization VSYNC) and clock signals (PCLK), which are suitable for scenarios with high requirements for real-time data transmission. The interface type of the connected camera can also be a MIPI CSI (Mobile Industry Processor Interface Camera Serial Interface) interface, which is a serial differential interface with low power consumption and strong anti-interference performance. It is widely used in mobile devices (such as mobile phone cameras) and supports high-speed data transmission (CSI-2 protocol maximum bandwidth 1.5Gbps / Lane). It can transmit raw Bayer data (Bayer RAW) or pre-processed YUV, RGB format data. The present application supports accessing and processing data from the above two types of interfaces (DVP and MIPI CSI), and realizes unified processing and conversion of heterogeneous camera data sources by dynamically adapting to the transmission characteristics and data formats of different interfaces.

[0034] In one embodiment, the types of signal formats supported by the connected camera and display screen include:

[0035] The RGB signal format directly represents the combination of the three primary colors red (R), green (G), and blue (B); its common sub-formats include: RGB444, RGB555, RGB565, RGB666, and RGB888.

[0036] The YUV signal format decomposes image signals into luminance (Y) and chrominance (U, V). Y represents luminance, reflecting the brightness of the image; U and V represent chrominance, describing the image's color. Common sub-formats include YUV444, YUV420, and YUV422.

[0037] The YCbCr signal format is a variant of the YUV signal format, primarily used in digital video. It also decomposes image signals into luminance (Y) and chrominance (Cb, Cr) components. Y represents luminance information, Cb represents the blue difference component, and Cr represents the red difference component. While conceptually similar to the YUV format, the YCbCr format differs in its implementation and quantization methods to better suit the requirements of digital video processing. Common sub-formats include YCbCr444, YCbCr420, and YCbCr422.

[0038] In one embodiment, input parameters are set according to the interface type and supported signal format of the connected camera; wherein the input parameters include:

[0039] The input interface type refers to the physical interface used by the camera to transmit image data, including the DVP (Digital Video Port) interface and the MIPI CSI (Mobile Industry Processor Interface Camera Serial Interface) interface.

[0040] The input interface bit width indicates the number of bits of data that can be transmitted in a single data transmission, reflecting the interface's data transmission capacity. It is set based on the actual bit width specification of the camera interface. For the DVP interface, the input interface bit width is fixed at 16 bits; for MIPI CSI, the bit width can reach 32 bits or even higher, allowing for more data to be carried in a single transmission.

[0041] The number of input pixel transfers refers to the number of data transfer operations required to transmit one pixel of data. In some interface protocols, the data for one pixel may need to be transmitted multiple times.

[0042] The total bit width per input pixel represents the total number of bits used by the input pixel data, reflecting the accuracy and information content of the pixel data. This setting is based on the camera output signal format.

[0043] Input signal format, indicating the signal format supported by the camera; signal format types include: RGB, YUV, and YCbCr.

[0044] Enter the start and end addresses of each component. For each component in the camera signal, indicate its start address and end address in the data stream to determine the position of each component data during the transmission process.

[0045] Input the invalid bit address of each component. In some cases, some component data of the camera signal may contain invalid bits (ie, bits without actual image information). These invalid bit addresses indicate the positions of these invalid bits in the data stream.

[0046] In one embodiment, output parameters are defined based on the signal format supported by the display screen and the display screen input requirements; wherein the output parameters include:

[0047] Output signal format, indicating the signal format supported by the display; signal format types include: RGB, YUV and YCbCr.

[0048] The total bit width per output pixel represents the total number of bits used by an output pixel, reflecting the accuracy and information content of the pixel data. This value should be set based on the signal format supported by the display. For example, if the display supports the RGB888 format, the total bit width per output pixel should be set to 24 bits.

[0049] Output the start and end addresses of each component. For each component in the output image data, indicate its start address and end address in the data stream, which is used to determine the position of each component data during the transmission process.

[0050] Output the invalid bit address of each component. In some cases, the bit width required by the display screen is larger than the total bit width of the output unit pixel, so the image data needs to be filled with invalid bits. These invalid bit addresses indicate the filling positions of these invalid bits in the output image data.

[0051] Step S2: Based on the defined input parameters, the input signal transmitted through the camera interface is analyzed and the effective components are extracted.

[0052] In one embodiment, step S2 includes:

[0053] Receive input signals transmitted via the camera interface based on the input interface type, input interface bit width, input unit pixel transmission count, and total input unit pixel bit width. Specifically, determine the physical connection method between the camera and the receiving device based on the input interface type. Ensure the correct number of data bits are received each time based on the input interface bit width. For example, if the input interface bit width is 16 bits, receive 16 bits of data each time. Determine the number of transmissions required to transmit one pixel of data based on the input unit pixel transmission count. For example, if a pixel needs to be transmitted twice, data must be received twice to form a complete pixel of data. Determine the total number of bits of data for one pixel based on the total input unit pixel bit width.

[0054] The input signal format, the start and end addresses of each input component, and the invalid bit addresses of each input component are combined to identify each component, remove invalid bits from each component, and extract the valid bits of each component. Specifically, the data organization format is determined based on the input signal format. For example, if the input signal format is RGB24, each pixel is composed of three color components: red, green, and blue, each with 8 bits. The position of each component in the data stream is determined based on the start and end addresses of each input component. For example, for the RGB 888 format, the R component has a start address of 0 and an end address of 7; the G component has a start address of 8 and an end address of 15; and the B component has a start address of 16 and an end address of 23. Based on the invalid bit addresses of each input component, invalid bits are identified and removed, and the valid bits of each component are extracted. For example, if bits 0 and 1 of a component are invalid bits, these bits should be ignored when extracting valid data. After completing the above steps, the valid bits of each component are extracted, resulting in valid image data that can be used for subsequent processing.

[0055] Step S3: Based on the defined output parameters, the extracted effective components are reorganized to generate image data adapted to the specifications of the display screen, so as to output the image data to the display screen for display.

[0056] In one embodiment, the step of recombining the extracted valid components based on the defined output parameters to generate image data adapted to the display screen specifications includes:

[0057] If the defined input signal format is consistent with the output signal format, the extracted valid components can be directly rearranged to generate image data that meets the display input requirements. The specific steps are as follows:

[0058] First, based on the start and end addresses of each output component and the output signal format required by the display, the starting and ending positions of each component in the data stream are determined. Second, based on the invalid bit addresses of each output component, invalid bits are identified and processed. If the display requires certain bits in the data stream to be invalid, these bits should be set to invalid values, such as 0, or retained when reordering the data, depending on the specific requirements of the display. Finally, the valid components are reordered. The extracted valid components are rearranged according to the start and end addresses and invalid bit addresses to generate image data that meets the display input requirements, ensuring that the image can be displayed correctly. The reorganized image data is stored in a FIFO. A FIFO (first-in, first-out queue) is a data structure used to buffer and manage data streams. Storing data in a FIFO ensures data order and integrity, facilitating subsequent output operations. Image data is read from the FIFO and output to the display for display.

[0059] This process can meet the needs of converting dispersed components into compact components, or converting compact components into dispersed components under the same signal format.

[0060] If the defined input signal format is inconsistent with the output signal format, color space conversion must be performed to convert the input signal format into an output signal format that is compatible with the display. The specific operation process is as follows:

[0061] First, due to inconsistent signal formats, color space conversion is required. Based on the extracted valid components, the input signal format is converted to the output signal format. Next, the start and end positions of each component in the data stream are determined based on the start and end addresses of each output component and the output signal format required by the display. If the display requires certain bits in the data stream to be invalid, these bits should be set to invalid values ​​when reordering the data based on the invalid bit addresses of each output component. Finally, the converted components are reordered. The components of the converted output signal format are reordered according to the start and end addresses and invalid bit addresses, generating image data that meets the display input requirements and ensures correct image display. The reordered image data is stored in a FIFO. Storing data in a FIFO ensures data order and integrity, facilitating subsequent output operations. Image data is read from the FIFO and output to the display for display.

[0062] Color conversion is performed using the color space conversion formula according to the input signal format and the output signal format, as follows:

[0063] If the input signal format is RGB and the output signal format is YUV, the color space conversion formula used is:

[0064]

[0065] If the input signal format is YUV and the output signal format is RGB, the color space conversion formula used is:

[0066]

[0067] If the input signal format is RGB and the output signal format is YCbCr, the color space conversion formula used is:

[0068]

[0069] If the input signal format is YCbCr and the output signal format is RGB, the color space conversion formula used is:

[0070]

[0071] Both YUV and YCbCr decompose image signals into luminance (Y) and chrominance (U, V or Cb, Cr). The main difference lies in their quantization method and value range: in YUV, the value range of Y is usually 0 to 255, and the value range of U and V is usually -128 to 127. In YCbCr, the value range of Y is 0 to 255, and the value range of Cb and Cr is usually 16 to 235 (for 8-bit representation).

[0072] If the input signal format is YUV and the output signal format is YCbCr, the color space conversion formula used is:

[0073]

[0074] If the input signal format is YCbCr and the output signal format is YUV, the color space conversion formula used is:

[0075]

[0076] It should be noted that formulas (1) and (2) are mainly for the conversion formulas between RGB and YUV444, and formulas (3) and (4) are mainly for the conversion formulas between RGB and YCbCr444. Therefore, when performing color space conversion, it is necessary to decide whether to perform conversion within the same format based on the specific format type. Specifically, if you want to convert the YUV420 or YUV422 format to an RGB format, such as RGB444, RGB555, RGB565, RGB666, or RGB888, you need to first convert the YUV420 or YUV422 format to the YUV444 format. After completing this step, use formula (2) to convert the YUV444 to the desired RGB format. Conversely, if you want to convert an RGB format (such as RGB444, RGB555, RGB565, RGB666, RGB888) to a YUV420 or YUV422 format, you need to first use formula (1) to convert the RGB to the YUV444 format. After that, convert YUV444 to YUV420 or YUV422 format.

[0077] The conversion process between YCbCr and RGB is similar to the conversion between YUV and RGB. If you want to convert YCbCr420 or YCbCr422 format to RGB format, you also need to first convert YCbCr420 or YCbCr422 to YCbCr444 format, and then use formula (4) to convert. Conversely, if you want to convert RGB format to YCbCr420 or YCbCr422 format, you need to first convert RGB to YCbCr444 format using formula (3), and then convert YCbCr444 to YCbCr420 or YCbCr422.

[0078] When converting YUV420 or YUV422 to YUV444 format, chroma components need to be interpolated. Common interpolation methods include nearest neighbor interpolation and bilinear interpolation. These methods can effectively increase the resolution of chroma components, thereby achieving conversion from a lower sampling rate to a higher sampling rate. When converting YUV444 to YUV420 or YUV422 format, chroma components need to be downsampled. This process involves appropriately downsampling the chroma components to accommodate the lower sampling rate requirements of the format. The conversion process between YCbCr420, YCbCr422, and YCbCr444 is similar to that for YUV formats, with some differences in the specific quantization and value ranges.

[0079] In one embodiment, the output parameters are further provided with special display processing information; the special display processing information is a processing instruction added after the image data is rearranged (such as format conversion, resolution adjustment) in order to adapt to the customized display requirements of the display screen, and mainly includes three categories: compression information set for compression processing, compression is to configure the sampling rate through registers so that the image can achieve a compressed visual effect when displayed on the display screen, and the compression information includes parameters such as the sampling rate. The screenshot information set for screenshot processing is to configure the starting position of the rows and columns through registers so that the image can achieve the visual effect of the screenshot when displayed on the display screen. The screenshot information includes: the starting pixel and the ending pixel of the screenshot function. The grayscale processing information set for grayscale processing is to configure only the brightness component in the image pixels through registers.

[0080] If compression information is set in the output parameters, the compression information, including parameters such as the sampling rate, is extracted from the output parameters. An appropriate compression algorithm is selected based on the sampling rate, and compression is performed based on the sampling rate to transmit the compressed image data to the display. For example, if the sampling rate is 10:1, only 1 of every 10 pixels sampled is retained, and the remaining 9 pixels are discarded, compressing the image data to 1 / 10 of its original size.

[0081] If screenshot information is set in the output parameters, the screenshot information is extracted from the output parameters, including the starting and ending pixels of the screenshot function. The screenshot area is determined based on the starting and ending pixels, and the data of the specified area is extracted from the rearranged image data to transmit the screenshot-processed image data to the display. For example, for an image with 400 rows and 800 columns, if the starting rows are set to 100 and the ending rows are set to 300, and the starting columns are set to 200 and the ending columns are set to 600, only the center portion of the image is retained, and the 1 / 4 area at the edge is cropped.

[0082] If grayscale processing information is set in the output parameter, the grayscale processing information is extracted from the output parameter, the brightness component is extracted from the rearranged image data, and the color component is discarded to transmit the grayscale processed image data to the display screen.

[0083] In order to better describe the above-mentioned camera signal format conversion method based on configurable parameter mapping, it is now described in conjunction with the following specific embodiments.

[0084] Example 1: Format conversion of RGB565 from a dispersed arrangement to a compact arrangement.

[0085] Input parameters defined based on the connected camera include:

[0086] Input interface type: DVP; input interface bit width: 10 bits; number of unit pixel transmissions: 2 times; total input unit pixel bit width: 20 bits; input signal format: RGB565; Figure 2 , enter the start and end addresses of each component: R component: bit0-4; G component: bit5-bit12; B component: bit13-bit19; enter the invalid bit address of each component: bit8-9 and bit18-19 are invalid bits:

[0087] Output parameters defined according to the connected display screen include:

[0088] Output signal format: RGB565 compact arrangement; total bit width of output unit pixel: 16 bits; such as Figure 3 , output the start and end addresses of each component: B component: bit0-4; G component: bit5-10; R component: bit11-15;

[0089] From the input data, the R component (bits 0-4) and the G component (bits 5-12) are extracted, and invalid bits (bits 8-9) are discarded. The B component (bits 13-19) is extracted, and invalid bits (bits 18-19) are discarded. The extracted valid components are reassembled according to the compact arrangement required by the display: the B component (5 bits) is placed in bits 0-4, the G component (6 bits) is placed in bits 5-10, and the R component (5 bits) is placed in bits 11-15. The combined data is 16 bits, meeting the target bit width requirement. The reassembled 16-bit data is stored in a FIFO for subsequent output operations. The use of a FIFO ensures data sequence and integrity, facilitating correct interpretation and display by the display. The reassembled image data is read from the FIFO and transmitted to the display. The display interprets this data according to its input requirements and displays the image correctly.

[0090] This embodiment converts RGB565 image data from a distributed to a compact arrangement and adjusts the positions of each component to meet the display's input requirements. This conversion not only improves data transmission efficiency but also saves bandwidth and storage space. Eliminating invalid bits further optimizes data validity, ensuring the integrity and accuracy of the image data.

[0091] Example 2: Format conversion from RGB888 to YUV444.

[0092] Input parameters defined based on the connected camera include:

[0093] Input interface type: MIPI CSI; Input interface bit width: 32 bits; Number of unit pixel transmissions: 1; Total input unit pixel bit width: 32 bits; Input signal format: RGB888; Input component start and end addresses: R component: bit0-7; G component: bit8-bit15; B component: bit13-bit19; Input invalid bit address of each component: bit24-31 is invalid bit:

[0094] Output parameters defined according to the connected display screen include:

[0095] Output signal format: YUV444; total bit width of output unit pixel: 24 bits; output start and end addresses of each component: Y component: bit0-7; U component: bit8-15; V component: bit16-23;

[0096] Extract the R component (bits 0-7), G component (bits 8-15), and B component (bits 16-31) from the input data, and discard invalid bits (bits 24-31). Convert the extracted R (8-bit), G (8-bit), and B (8-bit) components to YUV444 format. Then, rearrange the Y (8-bit), U (8-bit), and V (8-bit) components into 24 bits (each 24 bits contains a complete pixel) according to the output rules. The reorganized 24-bit data is stored in a FIFO for subsequent output operations. The reorganized 24-bit image data is read from the FIFO and transmitted to the display for display.

[0097] Example 3: Format conversion from RGB888 to YUV422.

[0098] Input parameters defined based on the connected camera include:

[0099] Input interface type: MIPI CSI; Input interface bit width: 32 bits; Number of unit pixel transmissions: 1; Total input unit pixel bit width: 32 bits; Input signal format: RGB888; Figure 4 , enter the start and end addresses of each component: R component: bit0-7; G component: bit8-bit15; B component: bit13-bit19; enter the invalid bit address of each component: bit24-31 is invalid bit:

[0100] Output parameters defined according to the connected display screen include:

[0101] Output signal format: YUV422; total bit width of output unit pixel: 16 bits; such as Figure 5 , output the starting and ending addresses of each component: Y1 component: bit0-7; U component: bit8-15; Y2 component: bit16-23; V component: bit24-31; 32 bits contain two pixels.

[0102] Extract the R component (bits 0-7), G component (bits 8-15), and B component (bits 16-31) from the input data, and discard invalid bits (bits 24-31). Convert the extracted R (8-bit), G (8-bit), and B (8-bit) components to YUV444 format, then to YUV422 format, and reorganize them into 32-bits according to the output rules (each 32 bits contains two complete pixels). The reorganized 32-bit data is stored in a FIFO for subsequent output operations. The reorganized image data is read from the FIFO and transmitted to the display for display.

[0103] Similar in principle to the above embodiment, the present invention provides a camera signal format conversion device based on configurable parameter mapping.

[0104] The following provides specific embodiments in conjunction with the accompanying drawings:

[0105] like Figure 6 A schematic structural diagram of a camera signal format conversion device based on configurable parameter mapping in an embodiment of the present invention is shown.

[0106] The device comprises:

[0107] Parameter definition module 1, used to dynamically define input parameters and output parameters based on the signal formats supported by the connected camera and display;

[0108] A component extraction module 2, connected to the parameter definition module 1, is used to parse the input signal transmitted through the camera interface based on the defined input parameters and extract valid components;

[0109] The component recombining module 3 is connected to the parameter definition module 1 and the component extraction module 2, and is used to recombine the extracted valid components based on the defined output parameters to generate image data adapted to the display screen specifications, so as to output the image data to the display screen for display.

[0110] Since the implementation principle of the camera signal format conversion device based on configurable parameter mapping has been described in the above embodiments, it will not be repeated here.

[0111] The camera signal format conversion method based on configurable parameter mapping provided by the embodiment of the present invention can be implemented on the terminal side or the server side. As for the hardware structure of the electronic terminal, please refer to Figure 7, is an optional hardware structure diagram of the electronic terminal 1000 provided in an embodiment of the present invention. The terminal 1000 can be a mobile phone, a computer device, a tablet device, a personal digital processing device, a factory background processing device, etc. The terminal 1000 includes: at least one processor 1001, a memory 1002, at least one network interface 10010 and a user interface 1009. The various components in the device are coupled together through a bus system 1005. It can be understood that the bus system 1005 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1005 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 7 In the text, various buses are labeled as bus systems.

[0112] The user interface 1009 may include a display, a keyboard, a mouse, a trackball, a click gun, keys, buttons, a touch pad or a touch screen.

[0113] It will be appreciated that the memory 1002 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM) or a programmable read-only memory (PROM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memory described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0114] The memory 1002 in the embodiment of the present invention is used to store various categories of data to support the operation of the terminal 1000. Examples of such data include: any executable program for operating on the terminal 1000, such as an operating system 10021 and an application 10022; the operating system 10021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application 10022 may include various applications, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The camera signal format conversion method based on configurable parameter mapping provided in the embodiment of the present invention may be included in the application 10022.

[0115] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 1001. Processor 1001 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 1001 or by software instructions. The above processor 1001 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 1001 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor 1001 may be a microprocessor or any conventional processor. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium located in a memory. The processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0116] In an exemplary embodiment, the terminal 1000 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), and complex programmable logic devices (CPLDs) to execute the aforementioned method.

[0117] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with a computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When executed, the program performs the steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0118] In the embodiments provided herein, the computer readable and writable storage medium may include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a magnetic disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store desired program code in the form of instructions or data structures and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, a fiber optic cable, a twisted pair, a digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwaves, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are included in the definition of the medium. However, it should be understood that computer readable and writable storage media and data storage media do not include connections, carriers, signals or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

[0119] In summary, the camera signal format conversion method, device, and terminal based on configurable parameter mapping of the present invention dynamically set input parameters and output parameters according to the signal formats supported by the connected camera and display screen; parse the input signal transmitted by the camera interface based on the input parameters and extract the effective components, and then reorganize the effective components according to the output parameters to generate image data adapted to the display screen specifications and output it for display. The present invention dynamically defines input and output parameters, and dynamic parameter mapping can automatically complete cross-interface and multi-format conversion of any camera signal to display screen format. It can adapt to any display screen specification without customized hardware, has strong versatility and a short development cycle, and solves the problems of poor compatibility, waste of resources, and single function of the existing technology. Therefore, the present invention effectively overcomes the various shortcomings of the existing technology and has high industrial utilization value.

[0120] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, any equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. A camera signal format conversion method based on configurable parameter mapping, characterized in that: The method comprises: Dynamically define input and output parameters based on the signal formats supported by the connected cameras and displays; Based on the defined input parameters, the input signal transmitted through the camera interface is analyzed and the effective components are extracted; Based on the defined output parameters, the extracted effective components are reorganized to generate image data adapted to the specifications of the display screen, so as to output the image data to the display screen for display.

2. The camera signal format conversion method based on configurable parameter mapping according to claim 1, characterized in that: The input parameters are set according to the interface type of the connected camera and the supported signal format; wherein the input parameters include: input interface type, input interface bit width, input unit pixel transmission times, input unit pixel total bit width, input signal format, input component start and end addresses, and input component invalid bit addresses.

3. The camera signal format conversion method based on configurable parameter mapping according to claim 2, characterized in that: The step of parsing the input signal transmitted through the camera interface based on the defined input parameters and extracting the valid components includes: The input signal transmitted through the camera interface is received according to the input interface type, input interface bit width, input unit pixel transmission times and input unit pixel total bit width, and each component is identified and invalid bits in each component are eliminated in combination with the input signal format, input start and end addresses of each component and input invalid bit addresses of each component, and the valid bits of each component are extracted.

4. The camera signal format conversion method based on configurable parameter mapping according to claim 3, characterized in that: Output parameters are defined based on the signal format supported by the display and the input requirements of the display; wherein the output parameters include: the output signal format, the total bit width of the output unit pixel corresponding to the output signal format, the start and end addresses of each output component, and the invalid bit address of each output component.

5. The camera signal format conversion method based on configurable parameter mapping according to claim 4, characterized in that: The step of recombining the extracted effective components based on the defined output parameters to generate image data adapted to the display screen specifications includes: If the defined input signal format is consistent with the output signal format, the extracted valid bits of each component are rearranged according to the output start and end addresses of each component and the invalid bit addresses of each component, to generate image data that meets the input requirements of the display screen, and store it in the FIFO, so that the image data can be output from the FIFO to the display screen; If the defined input signal format is inconsistent with the output signal format, the color space conversion is performed based on the extraction of the valid bits of each component to obtain the components of the output signal format, and the components of the converted output signal format are rearranged based on the output start and end addresses of each component and the output invalid bit addresses of each component to generate image data that meets the input requirements of the display screen and store it in the FIFO so that the image data can be output from the FIFO to the display screen.

6. The camera signal format conversion method based on configurable parameter mapping according to claim 5, characterized in that: The output parameters are further provided with special display processing information defined according to the special display requirements of the display screen, so as to perform corresponding processing on the rearranged image data; wherein the special display processing information includes: one or more of compression information, screenshot information and grayscale processing information.

7. The camera signal format conversion method based on configurable parameter mapping according to claim 6, characterized in that: If compression information is set in the output parameters, the rearranged image data is compressed based on the sampling rate in the compression information, so that the compressed image data is transmitted to the display screen; if screenshot information is set in the output parameters, the rearranged image data is screenshoted based on the starting pixel and ending pixel of the screenshot function in the screenshot information, so that the screenshoted image data is transmitted to the display screen; if grayscale processing information is set in the output parameters, only the brightness component of the rearranged image data is retained, and the color component is discarded, so that the grayscale processed image data is transmitted to the display screen.

8. The camera signal format conversion method based on configurable parameter mapping according to claim 2, characterized in that: The interface types of the connected cameras include: DVP and MIPI CSI; the signal formats supported by the connected cameras and displays include: RGB, YUV and YCbCr.

9. A camera signal format conversion device based on configurable parameter mapping, characterized in that: The device comprises: The parameter definition module is used to dynamically define input parameters and output parameters based on the signal formats supported by the connected camera and display screen; A component extraction module, connected to the parameter definition module, for parsing the input signal transmitted through the camera interface based on the defined input parameters and extracting valid components; The component recombining module is connected to the parameter definition module and the component extraction module, and is used to recombine the extracted valid components based on the defined output parameters to generate image data adapted to the display screen specifications, so as to output the image data to the display screen for display.

10. An electronic terminal, characterized in that: include: one or more memories and one or more processors; The one or more memories are used to store computer programs; The one or more processors, connected to the memory, are configured to run the computer program to perform the method as claimed in any one of claims 1 to 8.