CN110620935B - Image processing method and device - Google Patents
Image processing method and device Download PDFInfo
- Publication number
- CN110620935B CN110620935B CN201810629332.4A CN201810629332A CN110620935B CN 110620935 B CN110620935 B CN 110620935B CN 201810629332 A CN201810629332 A CN 201810629332A CN 110620935 B CN110620935 B CN 110620935B
- Authority
- CN
- China
- Prior art keywords
- image
- bit width
- bit
- width
- different
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/015—High-definition television systems
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an image processing method and device, and belongs to the field of image processing. The method comprises the following steps: acquiring an image bit width of a first image; determining an image processing channel corresponding to the image bit width according to the image bit width, wherein different image bit widths correspond to different image processing channels; and processing the first image through an image processing channel corresponding to the image bit width to obtain a second image. According to the invention, through automatically acquiring the image bit width of the input image and selecting the corresponding image processing channel to process the image, compatible processing of different image bit widths can be realized, and the optimal image processing effect is ensured.
Description
Technical Field
The present invention relates to the field of image processing, and in particular, to an image processing method and apparatus.
Background
SDI (Digital component Serial Interface) is an Interface for transmitting real-time uncompressed high-definition video images. After the camera shooting equipment collects the video images, the collected video images can be transmitted to the image processing equipment in real time through the SDI interface to be processed.
At present, video images transmitted through an SDI interface increasingly adopt 10Bit image Bit widths to improve image effects. Most image processing devices can only support video image processing with 8-Bit image Bit width, so that the problem that the video image cannot be processed due to incompatibility of the image Bit width often occurs, and therefore, an image processing method is urgently needed to realize compatible processing of different image Bit widths.
Disclosure of Invention
The embodiment of the invention provides an image processing method and device, which can solve the problem of incompatibility of image bit widths in the related art. The technical scheme is as follows:
in a first aspect, an image processing method is provided, the method comprising:
acquiring an image bit width of a first image;
determining an image processing channel corresponding to the image bit width according to the image bit width, wherein different image bit widths correspond to different image processing channels;
and processing the first image through an image processing channel corresponding to the image bit width to obtain a second image.
In one possible implementation manner, the acquiring an image bit width of the first image includes:
receiving the first image and SDI auxiliary data input through a digital component serial interface SDI interface;
extracting a load signature from the SDI assistance data;
and acquiring the image bit width of the first image according to the load mark.
In one possible implementation manner, the obtaining an image bit width of the first image according to the load flag includes:
and acquiring the image bit width of the first image according to the values of the first bit and the second bit in the designated byte of the load mark.
In a possible implementation manner, the obtaining an image bit width of the first image according to values of a first bit and a second bit in the specified byte of the load flag includes:
when the values of the first bit and the second bit are both first values, determining that the image bit width of the first image is a first bit width;
when the value of the first bit is the first numerical value and the value of the second bit is the second numerical value, determining that the image bit width of the first image is a second bit width;
when the value of the first bit is the second numerical value and the value of the second bit is the first numerical value, determining that the image bit width of the first image is a third bit width;
and when the values of the first bit and the second bit are the second numerical value, determining that the image bit width of the first image is other types of bit widths except the first bit width, the second bit width and the third bit width.
In a possible implementation manner, after the processing the first image through an image processing channel corresponding to the image bit width to obtain a second image, the method further includes:
packaging the second image according to a packaging mode corresponding to the image bit width;
and outputting the packaged second image through an output interface.
In one possible implementation, the method further includes:
when an image processing channel corresponding to the image bit width is determined, determining an output control channel corresponding to the image bit width, wherein different image bit widths correspond to different output control channels, and different output control channels adopt different packaging modes to package data;
correspondingly, the encapsulating the second image according to the encapsulating mode corresponding to the image bit width includes:
and packaging the second image through an output control channel corresponding to the image bit width.
In a possible implementation manner, after the encapsulating the second image through the output control channel corresponding to the image bit width, the method further includes:
according to the image bit width, communicating an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width and an output channel between the output interfaces;
and outputting the packaged second image through the output interface based on the output channel.
In a second aspect, there is provided an image processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the image bit width of the first image;
the determining module is used for determining an image processing channel corresponding to the image bit width according to the image bit width, wherein different image bit widths correspond to different image processing channels;
and the processing module is used for processing the first image through an image processing channel corresponding to the image bit width to obtain a second image.
In one possible implementation, the obtaining module is configured to receive the first image and SDI auxiliary data input through a digital component serial interface SDI interface; extracting a load signature from the SDI assistance data; and acquiring the image bit width of the first image according to the load mark.
In a possible implementation manner, the obtaining module is configured to obtain an image bit width of the first image according to values of a first bit and a second bit in the designated byte of the load flag.
In one possible implementation, the obtaining module is configured to:
when the values of the first bit and the second bit are both first values, determining that the image bit width of the first image is a first bit width;
when the value of the first bit is the first numerical value and the value of the second bit is the second numerical value, determining that the image bit width of the first image is a second bit width;
when the value of the first bit is the second numerical value and the value of the second bit is the first numerical value, determining that the image bit width of the first image is a third bit width;
and when the values of the first bit and the second bit are the second numerical value, determining that the image bit width of the first image is other types of bit widths except the first bit width, the second bit width and the third bit width.
In one possible implementation, the apparatus further includes:
the encapsulation module is used for encapsulating the second image according to the encapsulation mode corresponding to the image bit width;
and the output module is used for outputting the packaged second image through the output interface.
In a possible implementation manner, the determining module is further configured to determine, when determining an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width, where different image bit widths correspond to different output control channels, and different output control channels encapsulate data in different encapsulation manners;
correspondingly, the encapsulation module is configured to encapsulate the second image through an output control channel corresponding to the image bit width.
In a possible implementation manner, the output module is configured to communicate, according to the image bit width, an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width, and an output channel between the output interfaces; and outputting the packaged second image through the output interface based on the output channel.
In a third aspect, an electronic device is provided that includes a processor and a memory; the memory is used for storing at least one instruction; the processor is configured to execute at least one instruction stored in the memory to implement the method steps of any one of the implementation manners of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction, when executed by a processor, implements the method steps of any one of the implementations of the first aspect.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
by automatically acquiring the image bit width of the input image and selecting the corresponding image processing channel to process the image, different image bit widths correspond to different image processing channels, so that even if images with different image bit widths are input, the images can be processed through the corresponding image processing channels, and compatible processing of different image bit widths is realized. And because images with different image bit widths can be processed by selecting respectively proper image processing channels, the optimal image processing effect can be ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an image processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a processing method compatible with different image bit widths according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device 600 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present invention. Referring to fig. 1, the method includes:
101. and acquiring the image bit width of the first image.
The first image is an image to be processed, and the image bit width is a bit number of each pixel in the image, which determines the color number of each pixel. For example, the image Bit widths may include a first Bit width (8Bit), a second Bit width (10Bit), a third Bit width (12Bit), and other type Bit widths. Taking 8 bits as an example, the image Bit width is 8 bits, which indicates that each pixel corresponds to 8 bits in the memory.
102. And determining an image processing channel corresponding to the image bit width according to the image bit width, wherein different image bit widths correspond to different image processing channels.
Different image processing channels are used for processing images with different image bit widths, and different image processing algorithms can be configured for different image processing channels. For example, a plurality of processing modules for implementing respective image processing algorithms may be configured in the image processing channel. Different processing modules are configured in different image processing channels, so that different image processing algorithms are realized, the targeted processing of different color gamuts can be realized, and the image quality under different bit widths is ensured.
103. And processing the first image through an image processing channel corresponding to the image bit width to obtain a second image.
The second image is the result of the first image after being processed by the image processing channel.
According to the method provided by the embodiment of the invention, the image bit width of the input image is automatically acquired, the corresponding image processing channel is selected to process the image, and different image bit widths correspond to different image processing channels, so that even if the images with different image bit widths are input, the images with different image bit widths can be processed through the corresponding image processing channels, and the compatible processing of different image bit widths is realized. And because images with different image bit widths can be processed by selecting respectively proper image processing channels, the optimal image processing effect can be ensured.
Fig. 2 is a flowchart of an image processing method according to an embodiment of the present invention. Referring to fig. 2, the method includes:
201. first image and SDI auxiliary data input through an SDI interface are received.
In the embodiment of the present invention, when the electronic device receives the input first image through the SDI interface, the electronic device may further acquire SDI auxiliary data. For example, after the camera device captures a video image, the video image can be transmitted to the electronic device in real time through the SDI interface in the form of a data stream, and meanwhile, the SDI auxiliary data is superimposed at a gap in the data stream that does not affect normal image data, so that the electronic device can receive the image and the SDI auxiliary data at the same time. Of course, the electronic device may also be the image capturing device, which is not limited in the embodiment of the present invention.
In The SDI standard (for example, SMPTE-425M standard) of The Society of Motion Picture and Television Engineers, SDI auxiliary data includes a load flag (load Identifier), includes a definition of The Bit width of The currently transmitted image therein, and can indicate four different Bit widths, i.e., a first Bit width (8Bit), a second Bit width (10Bit), a third Bit width (12Bit), and other types of Bit widths. Therefore, the electronic device may acquire an image bit width of the first image according to the SDI auxiliary data.
202. And acquiring the image bit width of the first image according to the load mark extracted from the SDI auxiliary data.
In the embodiment of the present invention, after receiving an input image and SDI auxiliary data, an electronic device may extract a load flag from the SDI auxiliary data, and further acquire an image bit width of the first image according to the load flag.
In a possible implementation manner, the electronic device may obtain an image bit width of the first image according to values of a first bit and a second bit in the designated byte of the load flag. For example, the load flag may include 4 bytes, such as Byte1, Byte2, Byte3, and Byte4, wherein Byte4 is the designated Byte. Each byte may include 8 bits, Bit0, Bit1, … …, Bit7, etc., where Bit0 is the first Bit and Bit1 is the second Bit.
In the load flag extraction and bit width judgment, the electronic device may refer to the SDI standard of SMPTE. Specifically, when the values of the first bit and the second bit are both first values, determining that the image bit width of the first image is a first bit width; when the value of the first bit is the first numerical value and the value of the second bit is the second numerical value, determining that the image bit width of the first image is a second bit width; when the value of the first bit is the second numerical value and the value of the second bit is the first numerical value, determining that the image bit width of the first image is a third bit width; and when the values of the first bit and the second bit are the second numerical value, determining that the image bit width of the first image is other types of bit widths except the first bit width, the second bit width and the third bit width.
For example, the first value is 1, the second value is 0, the first Bit width is 8 bits, the second Bit width is 10 bits, and the third Bit width is 12 bits. Accordingly, when Bit1 is 0 and Bit0 is 0 in Byte4 of the load flag, it is determined that the image Bit width of the image is 8 bits; when Bit1 is 0 and Bit0 is 1 in Byte4 of the load flag, determining that the image Bit width of the image is 10 bits; when Bit1 is 1 and Bit0 is 0 in Byte4 of the load flag, determining that the image Bit width of the image is 12 bits; when Bit1 is 1 and Bit0 is 1 in Byte4 of the load flag, the image Bit width of the image is determined to be other types of Bit widths than 8Bit, 10Bit, and 12 Bit. The Bit width of the other type may be customized, for example, the Bit width of the other type is customized to be 14 bits, which is not limited in the embodiment of the present invention.
It should be noted that, the above steps 201 to 202 are one possible implementation manner of acquiring the image bit width of the first image. The image Bit width of the first image is obtained according to the values of Bit1 and Bit0 in the Byte4 of the load mark, and an effective mode for automatically identifying the image Bit width is provided, so that the electronic equipment can select a corresponding image processing channel to process the image according to the automatically identified image Bit width, and the optimal image processing effect is realized.
203. And determining an image processing channel corresponding to the image bit width according to the image bit width, and processing the first image through the image processing channel corresponding to the image bit width to obtain a second image, wherein different image bit widths correspond to different image processing channels.
In the embodiment of the present invention, the electronic device may be provided with a plurality of image processing channels, each image processing channel is configured to process images with different image bit widths, the image processing channels with different image bit widths are configured with different image processing algorithms, and each image processing channel implements a corresponding image processing algorithm when processing an image.
For example, the electronic device may set a corresponding number of image processing channels according to the number of types of image bit widths. Accordingly, after the electronic device obtains the image bit width, a corresponding image processing channel may be allocated to the image according to the image bit width. For example, the image Bit width has two types, 8Bit and 10Bit, the electronic device can set 2 image processing channels and configure 2 image processing algorithms. Similarly, if the image Bit width has three types, i.e., 8Bit, 10Bit, and 12Bit, the electronic device may set 3 image processing channels and configure 3 image processing algorithms.
After obtaining the image bit width of the first image, the electronic device may input the first image into the corresponding image processing channel for processing according to the image bit width, which not only can implement compatible processing of different image bit widths, but also can ensure the optimal processing effect of the image.
Compared with the related art in which only specific image bit width is supported, the problem that the image bit width is incompatible and the image cannot be processed easily occurs, or the problem that the image quality is lost after processing easily occurs by adopting simple processing modes such as shifting and 0 complementing. In the embodiment of the invention, different image processing channels are selected according to different image Bit widths to process the input image, so that the targeted processing of different color gamuts such as BT709 (usually 8 bits) and BT2020(10 bits) can be realized, the compatible processing of different image Bit widths can be realized, and the image quality under different Bit widths can be ensured.
204. And according to the encapsulation mode corresponding to the image bit width, after the second image is encapsulated, outputting the encapsulated second image through an output interface.
In the embodiment of the present invention, the electronic device is provided with an output interface, and the output interface can be used for outputting image processing results with different image bit widths, that is, a second image. The output interface may perform different encapsulation (packaging) methods for different image bit widths, and after the electronic device completes image processing in step 203 to obtain the second image, the electronic device may encapsulate the second image according to the encapsulation method corresponding to the image bit width of the first image. When packaging, the electronic device can only package the effective image data, and filter out other data such as load marks.
In one possible implementation, when determining the image processing channel corresponding to the image bit width, the electronic device may also determine an output control channel corresponding to the image bit width. Different image bit widths correspond to different output control channels, and the different output control channels adopt different packaging modes to package data; furthermore, the electronic device may package the second image according to a packaging manner corresponding to the image bit width, including: and packaging the second image through an output control channel corresponding to the image bit width. For example, the electronic device may set a corresponding number of output control channels according to the number of types of image bit widths. Accordingly, after the second image is obtained, the output control channel corresponding to the image bit width may encapsulate the second image. By setting the image processing channels and the output control channels with corresponding quantity according to the quantity of the image bit width, the optimal image processing effect and the optimal matching bit width output channel can be ensured to be available for each image bit width.
It should be noted that step 204 is an optional step, and the embodiment of the present invention only takes the example that the electronic device encapsulates and outputs the second image obtained after the first image is processed as an example, and provides a possible implementation manner for outputting the image processing result.
In the embodiment of the present invention, in order to process multiple image bit widths compatibly, the electronic device may be provided with multiple image processing channels, and when an image with any image bit width is input to the electronic device, the electronic device may select a corresponding image processing channel to process according to the image bit width, where only one image processing channel among the multiple image processing channels actually performs an image processing process. Therefore, before outputting the encapsulated second image through the output interface, the electronic device needs to perform output channel gating, that is, according to the image bit width, communicate the image processing channel corresponding to the image bit width, the output control channel corresponding to the image bit width, and the output channel between the output interface, and output the encapsulated second image through the output interface based on the output channel.
In the above steps, the image bit width of the first image input by the SDI interface is judged, then the corresponding image processing channel is selected, and after the processing is completed, the second image is output from the output channel corresponding to the image bit width. Referring to fig. 3, a schematic flow chart of a processing method compatible with different image bit widths is provided, as shown in fig. 3, an electronic device first receives a first image input by an SDI interface, extracts a load flag in SDI auxiliary data, determines a current image bit width, selects a corresponding processing channel and an output control channel according to the image bit width, and finally performs output channel gating to output a processed second image through an output interface. The electronic device may be provided with N image processing channels, such as an image bit width 1 processing channel, an image bit width 2 processing channel, … …, and an image bit width N processing channel, and N output control channels, such as an image bit width 1 output control channel, an image bit width 2 output control channel, … …, and an image bit width N output control channel. Where N is a natural number, the electronic device may set N according to the Bit width number of the image subjected to the compatible processing, for example, if the electronic device is subjected to the compatible processing for two types of image Bit widths, i.e., 8Bit and 10Bit, the N is 2, if the electronic device is subjected to the compatible processing for three types of image Bit widths, i.e., 8Bit, 10Bit and 12Bit, the N is 3, and if the electronic device is subjected to the compatible processing for four types of image Bit widths, i.e., 8Bit, 10Bit, 12Bit and 14Bit, the N is 4.
The following describes the scheme of the present invention in further detail by taking the electronic device compatible processing of two image Bit widths of 8Bit and 10Bit as an example through steps a to e, and the Bit widths of other images are the same.
Step a, receiving a first image input by the SDI interface, extracting a load flag in the SDI auxiliary data, indicating that the current image Bit width is 8 bits if Bit1 and Bit0 in Byte4 are 0 and indicating that the current image Bit width is 10 bits if Bit1 and Bit0 are 1.
And b, selecting a correct image processing channel according to the judged image bit width by the processing channel distribution process.
And c, if the image Bit width is 8 bits, selecting an image processing channel of 8 bits, wherein the data processing Bit width in the image processing channel supports the image Bit width processing of 8 bits, and if the image Bit width is 10 bits, selecting an image processing channel of 10 bits in the same manner to finish the image processing.
And d, receiving the image processing result with the corresponding bit width by the output control channel, and finishing data encapsulation according to the requirement of the output interface.
And e, finally, carrying out output channel gating according to the image bit width, and outputting the effective image data through an output interface. Thus, compatible processing of 8-Bit and 10-Bit image Bit widths is completed.
By utilizing the load mark of the SDI standard protocol, the image bit width input by the SDI interface is automatically identified, and meanwhile, the image processing channel and the image output control channel with corresponding bit width are automatically switched, so that the optimal image processing and transmission effects are ensured, and the self-adaptive processing of different image bit widths is realized.
According to the method provided by the embodiment of the invention, the image bit width of the input image is automatically acquired, the corresponding image processing channel is selected to process the image, and different image bit widths correspond to different image processing channels, so that even if the images with different image bit widths are input, the images with different image bit widths can be processed through the corresponding image processing channels, and the compatible processing of different image bit widths is realized. And because images with different image bit widths can be processed by selecting respectively proper image processing channels, the optimal image processing effect can be ensured.
Fig. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. Referring to fig. 4, the apparatus includes:
an obtaining module 401, configured to obtain an image bit width of a first image;
a determining module 402, configured to determine, according to the image bit width, an image processing channel corresponding to the image bit width, where different image bit widths correspond to different image processing channels;
the processing module 403 is configured to process the first image through an image processing channel corresponding to the image bit width to obtain a second image.
In one possible implementation, the obtaining module 401 is configured to receive the first image and SDI auxiliary data input through a digital component serial interface SDI interface; extracting a load flag from the SDI auxiliary data; and acquiring the image bit width of the first image according to the load mark.
In a possible implementation manner, the obtaining module 401 is configured to obtain an image bit width of the first image according to values of a first bit and a second bit in the designated byte of the load flag.
In one possible implementation, the obtaining module 401 is configured to:
when the values of the first bit and the second bit are both first values, determining that the image bit width of the first image is a first bit width;
when the value of the first bit is the first numerical value and the value of the second bit is the second numerical value, determining that the image bit width of the first image is a second bit width;
when the value of the first bit is the second numerical value and the value of the second bit is the first numerical value, determining that the image bit width of the first image is a third bit width;
and when the values of the first bit and the second bit are the second numerical value, determining that the image bit width of the first image is other types of bit widths except the first bit width, the second bit width and the third bit width.
In one possible implementation, referring to fig. 5, the apparatus further includes:
a packaging module 404, configured to package the second image according to a packaging manner corresponding to the image bit width;
and an output module 405, configured to output the packaged second image through an output interface.
In a possible implementation manner, the determining module 402 is further configured to determine, when determining an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width, where different image bit widths correspond to different output control channels, and different output control channels encapsulate data in different encapsulation manners;
accordingly, the encapsulating module 404 is configured to encapsulate the second image through the output control channel corresponding to the image bit width.
In a possible implementation manner, the output module 405 is configured to communicate, according to the image bit width, an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width, and an output channel between the output interfaces; and outputting the packaged second image through the output interface based on the output channel.
The device provided by the embodiment of the invention automatically acquires the image bit width of the input image, and selects the corresponding image processing channel to process the image, and different image bit widths correspond to different image processing channels, so that even if images with different image bit widths are input, the images can be processed through the corresponding image processing channels, and compatible processing of different image bit widths is realized. And because images with different image bit widths can be processed by selecting respectively proper image processing channels, the optimal image processing effect can be ensured.
It should be noted that: in the image processing apparatus provided in the above embodiment, when processing an image, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the image processing apparatus and the image processing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments in detail and are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device 600 according to an embodiment of the present invention. The electronic device 600 may be: a smartphone, a tablet, a laptop, or a desktop computer. Electronic device 600 may also be referred to by other names as user equipment, portable electronic device, laptop electronic device, desktop electronic device, and so on.
In general, the electronic device 600 includes: a processor 601 and a memory 602.
The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for execution by processor 601 to implement the image processing methods provided by the method embodiments herein.
In some embodiments, the electronic device 600 may further optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602, and peripheral interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a display 605, a camera 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other electronic devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 604 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 605 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to capture touch signals on or over the surface of the display screen 605. The touch signal may be input to the processor 601 as a control signal for processing. At this point, the display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 605 may be one, providing the front panel of the electronic device 600; in other embodiments, the display 605 may be at least two, respectively disposed on different surfaces of the electronic device 600 or in a foldable design; in still other embodiments, the display 605 may be a flexible display disposed on a curved surface or on a folded surface of the electronic device 600. Even more, the display 605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 605 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of an electronic apparatus, and a rear camera is disposed on a rear surface of the electronic apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The positioning component 608 is used to locate a current geographic Location of the electronic device 600 to implement navigation or LBS (Location Based Service). The Positioning component 608 can be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union's galileo System.
The power supply 609 is used to supply power to various components in the electronic device 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 600 also includes one or more sensors 610. The one or more sensors 610 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615, and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the electronic device 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the touch screen display 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the electronic device 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the electronic device 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 613 may be disposed on a side bezel of the electronic device 600 and/or on an underlying layer of the touch display screen 605. When the pressure sensor 613 is disposed on a side frame of the electronic device 600, a user's holding signal of the electronic device 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the touch display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 614 may be disposed on the front, back, or side of the electronic device 600. When a physical button or vendor Logo is provided on the electronic device 600, the fingerprint sensor 614 may be integrated with the physical button or vendor Logo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of touch display 605 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is turned down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
Proximity sensor 616, also referred to as a distance sensor, is typically disposed on the front panel of electronic device 600. The proximity sensor 616 is used to capture the distance between the user and the front of the electronic device 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front face of the electronic device 600 gradually decreases, the processor 601 controls the touch display screen 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front surface of the electronic device 600 gradually becomes larger, the processor 601 controls the touch display screen 605 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 does not constitute a limitation of the electronic device 600, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, there is also provided a computer readable storage medium, such as a memory, having at least one instruction stored thereon, which when executed by a processor, implements the image processing method in the above embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (12)
1. An image processing method, characterized in that the method comprises:
acquiring an image bit width of a first image;
determining an image processing channel corresponding to the image bit width and an output control channel corresponding to the image bit width according to the image bit width, wherein different image bit widths correspond to different image processing channels, different image bit widths correspond to different output control channels, and different output control channels adopt different packaging modes to package data;
processing the first image through an image processing channel corresponding to the image bit width to obtain a second image;
and packaging the second image through an output control channel corresponding to the image bit width.
2. The method of claim 1, wherein obtaining the image bit width of the first image comprises:
receiving the first image and SDI auxiliary data input through a digital component serial interface SDI interface;
extracting a load signature from the SDI assistance data;
and acquiring the image bit width of the first image according to the load mark.
3. The method according to claim 2, wherein said obtaining an image bit width of the first image according to the load flag comprises:
and acquiring the image bit width of the first image according to the values of the first bit and the second bit in the designated byte of the load mark.
4. The method according to claim 3, wherein obtaining the image bit width of the first image according to values of a first bit and a second bit in the specified byte of the payload flag comprises:
when the values of the first bit and the second bit are both first values, determining that the image bit width of the first image is a first bit width;
when the value of the first bit is the first numerical value and the value of the second bit is the second numerical value, determining that the image bit width of the first image is a second bit width;
when the value of the first bit is the second numerical value and the value of the second bit is the first numerical value, determining that the image bit width of the first image is a third bit width;
and when the values of the first bit and the second bit are the second numerical value, determining that the image bit width of the first image is other types of bit widths except the first bit width, the second bit width and the third bit width.
5. The method according to claim 1, wherein after the second image is encapsulated by the output control channel corresponding to the image bit width, the method further comprises:
and outputting the packaged second image through an output interface.
6. The method according to claim 1, wherein after the second image is encapsulated by the output control channel corresponding to the image bit width, the method further comprises:
according to the image bit width, communicating an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width and an output channel between output interfaces;
and outputting the packaged second image through the output interface based on the output channel.
7. An image processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring the image bit width of the first image;
the determining module is used for determining an image processing channel corresponding to the image bit width and an output control channel corresponding to the image bit width according to the image bit width, wherein different image bit widths correspond to different image processing channels, different image bit widths correspond to different output control channels, and different output control channels adopt different packaging modes to package data;
the processing module is used for processing the first image through an image processing channel corresponding to the image bit width to obtain a second image;
and the packaging module is used for packaging the second image through an output control channel corresponding to the image bit width.
8. The apparatus of claim 7, wherein the acquisition module is configured to receive the first image and SDI auxiliary data input through a digital component serial interface SDI interface; extracting a load signature from the SDI assistance data; and acquiring the image bit width of the first image according to the load mark.
9. The apparatus according to claim 8, wherein the obtaining module is configured to obtain the image bit width of the first image according to values of a first bit and a second bit in the specified byte of the payload flag.
10. The apparatus of claim 9, wherein the obtaining module is configured to:
when the values of the first bit and the second bit are both first values, determining that the image bit width of the first image is a first bit width;
when the value of the first bit is the first numerical value and the value of the second bit is the second numerical value, determining that the image bit width of the first image is a second bit width;
when the value of the first bit is the second numerical value and the value of the second bit is the first numerical value, determining that the image bit width of the first image is a third bit width;
and when the values of the first bit and the second bit are the second numerical value, determining that the image bit width of the first image is other types of bit widths except the first bit width, the second bit width and the third bit width.
11. The apparatus of claim 7, further comprising:
and the output module is used for outputting the packaged second image through the output interface.
12. The apparatus of claim 7, further comprising:
the output module is used for communicating an image processing channel corresponding to the image bit width, an output control channel corresponding to the image bit width and an output channel between an output interface according to the image bit width; and outputting the packaged second image through the output interface based on the output channel.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810629332.4A CN110620935B (en) | 2018-06-19 | 2018-06-19 | Image processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810629332.4A CN110620935B (en) | 2018-06-19 | 2018-06-19 | Image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110620935A CN110620935A (en) | 2019-12-27 |
CN110620935B true CN110620935B (en) | 2022-04-08 |
Family
ID=68920206
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810629332.4A Active CN110620935B (en) | 2018-06-19 | 2018-06-19 | Image processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110620935B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116391199A (en) * | 2020-10-19 | 2023-07-04 | 高通股份有限公司 | Processing image data by prioritizing layer attributes |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007116551A1 (en) * | 2006-03-30 | 2007-10-18 | Kabushiki Kaisha Toshiba | Image coding apparatus and image coding method, and image decoding apparatus and image decoding method |
CN101996609A (en) * | 2009-08-13 | 2011-03-30 | 上海奇码数字信息有限公司 | Pixel format converting method and device in graphic processing |
CN103329194A (en) * | 2011-01-25 | 2013-09-25 | 晶像股份有限公司 | Conversion and processing of deep color video in a single clock domain |
CN103503070A (en) * | 2011-04-28 | 2014-01-08 | 松下电器产业株式会社 | Recording medium, playback device, recording device, encoding method, and decoding method related to higher image quality |
CN103827956A (en) * | 2011-09-27 | 2014-05-28 | 皇家飞利浦有限公司 | Apparatus and method for dynamic range transforming of images |
CN106961612A (en) * | 2017-03-16 | 2017-07-18 | 广东欧珀移动通信有限公司 | A kind of image processing method and equipment |
-
2018
- 2018-06-19 CN CN201810629332.4A patent/CN110620935B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007116551A1 (en) * | 2006-03-30 | 2007-10-18 | Kabushiki Kaisha Toshiba | Image coding apparatus and image coding method, and image decoding apparatus and image decoding method |
CN101996609A (en) * | 2009-08-13 | 2011-03-30 | 上海奇码数字信息有限公司 | Pixel format converting method and device in graphic processing |
CN103329194A (en) * | 2011-01-25 | 2013-09-25 | 晶像股份有限公司 | Conversion and processing of deep color video in a single clock domain |
CN103503070A (en) * | 2011-04-28 | 2014-01-08 | 松下电器产业株式会社 | Recording medium, playback device, recording device, encoding method, and decoding method related to higher image quality |
CN103827956A (en) * | 2011-09-27 | 2014-05-28 | 皇家飞利浦有限公司 | Apparatus and method for dynamic range transforming of images |
CN106961612A (en) * | 2017-03-16 | 2017-07-18 | 广东欧珀移动通信有限公司 | A kind of image processing method and equipment |
Non-Patent Citations (1)
Title |
---|
4.1.6 Payload Identifier;SMPTE;《SMPTE 425-2008, Revision of SMPTE 425M-2006: 3 GB/s Signal/Data Serial Interface - Source Image Format Mapping》;20080703;第7页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110620935A (en) | 2019-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111372126B (en) | Video playing method, device and storage medium | |
CN110618805B (en) | Method and device for adjusting electric quantity of equipment, electronic equipment and medium | |
CN110769313B (en) | Video processing method and device and storage medium | |
CN111447389B (en) | Video generation method, device, terminal and storage medium | |
CN111031170A (en) | Method, apparatus, electronic device and medium for selecting communication mode | |
CN110839174A (en) | Image processing method and device, computer equipment and storage medium | |
CN112256320A (en) | Version number generation method, device, terminal and storage medium | |
CN110349527B (en) | Virtual reality display method, device and system and storage medium | |
CN109819314B (en) | Audio and video processing method and device, terminal and storage medium | |
CN109783176B (en) | Page switching method and device | |
CN111565309A (en) | Display equipment and distortion parameter determination method, device and system thereof, and storage medium | |
CN111083554A (en) | Method and device for displaying live gift | |
CN111901679A (en) | Method and device for determining cover image, computer equipment and readable storage medium | |
CN110620935B (en) | Image processing method and device | |
CN111324293B (en) | Storage system, data storage method, data reading method and device | |
CN109413190B (en) | File acquisition method and device, electronic equipment and storage medium | |
CN110636326A (en) | Live video processing method and device and storage medium | |
CN112184802A (en) | Calibration frame adjusting method and device and storage medium | |
CN111008083A (en) | Page communication method and device, electronic equipment and storage medium | |
CN111369434B (en) | Method, device, equipment and storage medium for generating spliced video covers | |
CN110660031B (en) | Image sharpening method and device and storage medium | |
CN108881739B (en) | Image generation method, device, terminal and storage medium | |
CN110471613B (en) | Data storage method, data reading method, device and system | |
CN108881715B (en) | Starting method and device of shooting mode, terminal and storage medium | |
CN110443841B (en) | Method, device and system for measuring ground depth |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |