Image processing method and related device, system and storage medium

By acquiring the parameter differences between representative areas and target areas in the image and adjusting the image signals in a targeted manner, the signal attenuation problem caused by the transmission line length during image signal transmission is solved, and the image restoration and processing efficiency are improved.

CN118764722BActive Publication Date: 2024-12-17ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411249614.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-17
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

The prior art has the problem of low image restoration, insufficient compensation or excessive compensation due to signal attenuation caused by transmission lines of different lengths during image signal transmission.

Method used

By acquiring parameter information representing the region in the original image and the target region parameters in the image to be processed, the image to be processed is adjusted based on the differences between the two, and the signal attenuation is targeted to improve the image restoration degree.

Benefits of technology

The effect of image restoring to original image after transmission line is improved, the degree of image restoration is improved, and the efficiency of image processing is improved through partial area processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764722B_ABST
    Figure CN118764722B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method and related equipment, system and storage medium, wherein the image processing method comprises: obtaining parameter information of a representative area in an original image, and obtaining an image to be processed obtained by transmitting the original image through a transmission line; wherein the parameter information comprises representative image parameters of the representative area; obtaining target image parameters of a target area in the image to be processed, the target area being an area in the image to be processed corresponding to the position of the representative area; and adjusting the style of the image to be processed based on a first difference between the representative image parameters and the target image parameters. The above scheme can improve the restoration degree of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method and related equipment, system and storage medium. Background Art

[0002] The front-end camera can be connected to the back-end storage device through transmission lines of different lengths, thereby transmitting the original image signal collected by the front-end device to the back-end storage device. Different original image signals will show different degrees of signal attenuation after being transmitted through transmission lines of different lengths.

[0003] At present, the attenuated image signal is mainly compensated by a uniform signal compensation intensity. When the signal attenuation is low, it may lead to over-compensation. When the signal attenuation is high, it may lead to under-compensation and low image restoration.

[0004] Therefore, how to improve the image restoration degree has become a problem that needs to be solved urgently. Summary of the invention

[0005] The main technical problem solved by the present application is to provide an image processing method and related equipment, system and storage medium, which can improve the image restoration degree.

[0006] In order to solve the above technical problems, the first aspect of the present application provides an image processing method, which includes: obtaining parameter information of a representative area in an original image, and obtaining an image to be processed obtained by transmitting the original image via a transmission line; wherein the parameter information includes representative image parameters of the representative area; obtaining target image parameters of a target area in the image to be processed, the target area being an area in the image to be processed corresponding to the position of the representative area; and performing style adjustment on the image to be processed based on a first difference between the representative image parameters and the target image parameters.

[0007] In order to solve the above-mentioned technical problems, the second aspect of the present application provides an image processing method, which includes: dividing the original image to be transmitted into multiple area units; selecting a representative area from the multiple area units; transmitting the original image and parameter information of the representative area in the original image to a back-end device through a transmission line, the parameter information including representative image parameters of the representative area, and the back-end device can restore the original image based on the data received through the transmission line.

[0008] In order to solve the above technical problems, the third aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, and the processor is used to execute program instructions stored in the memory to implement the image processing method in the above first aspect or second aspect.

[0009] In order to solve the above-mentioned technical problems, the fourth aspect of the present application provides an image processing system, which includes a front-end image acquisition device and a back-end device. The front-end image acquisition device is connected to the back-end device via a transmission line. The back-end device is used to execute the image processing method in the above-mentioned first aspect, and the front-end image acquisition device is used to execute the image processing method in the above-mentioned second aspect.

[0010] In order to solve the above technical problems, the fifth aspect of the present application provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, the image processing method in the above first aspect or second aspect is implemented.

[0011] The above scheme obtains parameter information of the representative area in the original image, and obtains the image to be processed obtained by transmitting the original image through the transmission line; wherein the parameter information includes the representative image parameters of the representative area; and obtains the target image parameters of the target area in the image to be processed, the target area is the area in the image to be processed corresponding to the position of the representative area, and then based on the first difference between the representative image parameters and the target image parameters, the style of the image to be processed is adjusted. On the one hand, the image to be processed is obtained by transmitting the original image through the transmission line, and the attenuation generated by the transmission lines with different line lengths during the signal transmission process can be reflected in the form of the first difference, and then the style of the image to be processed is adjusted in a targeted manner based on the first difference to achieve compensation for the attenuated image signal, which can improve the effect of restoring the image to be processed to the original image, thereby improving the restoration degree of the image; on the other hand, by processing the image parameters of a part of the image to obtain the first difference, the efficiency of image processing can be improved compared with processing the entire image. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram of the framework of an embodiment of the image processing system of the present application;

[0013] Figure 2 This is a flowchart of the first embodiment of the image processing method of the present application;

[0014] Figure 3 A schematic diagram of an embodiment of an image to be processed in the present application;

[0015] Figure 4 This is a flow chart of the second embodiment of the image processing method of the present application;

[0016] Figure 5 A schematic diagram of an embodiment of a regional unit of the present application;

[0017] Figure 6 A schematic diagram of a framework of an embodiment of an electronic device of the present application;

[0018] Figure 7A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0019] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0020] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0021] The term "multiple" herein means two or more than two. In addition, the term "at least one" herein means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, and may mean including any one or more elements selected from the set consisting of A, B, and C.

[0022] See also Figure 1 , Figure 1 This is a framework diagram of an embodiment of an image processing system 10 of the present application. The image processing system 10 includes at least a front-end image acquisition device 11 and a back-end device 12, wherein the back-end device 12 is used to implement the image processing method in the first embodiment described below, and the front-end image acquisition device 11 is used to implement the image processing method in the second embodiment described below.

[0023] In one implementation scenario, the front-end image acquisition device 11 includes a camera module 111 and a signal processing module 112. The camera module 111 is used to acquire original images, and may include but is not limited to: an infrared camera, a color camera, a network camera, etc. The signal processing module 112 is used to process the acquired original images, and may include but is not limited to: a signal processing chip, a dedicated integrated circuit, a field programmable gate array or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0024] In one implementation scenario, the back-end device 12 is used to process data sent by the front-end image acquisition device 11 and transmitted through the transmission line, and may include but is not limited to: coaxial high-definition video recorder (XVR), digital video recorder (DVR), network video recorder (NVR), etc.

[0025] In one implementation scenario, the transmission line may include but is not limited to: a coaxial transmission line, a twisted pair, etc. As a possible example, the transmission line is a coaxial transmission line, which is connected between the front-end image acquisition device 11 and the back-end device 12, and transmits image signals through a coaxial communication protocol, such as a high-definition composite video interface (HDCVI) protocol, etc. The length of the coaxial line can be 1 meter, 2 meters, 50 meters, 100 meters, 200 meters, 300 meters, etc., and examples are not given one by one here.

[0026] In a specific implementation scenario, the transmission line is connected between the front-end image acquisition device 11 and the back-end device 12, and digital signals and analog signals can be transmitted simultaneously. Specifically, before transmitting the analog signal, the front-end image acquisition device 11 will modulate the analog signal, and the back-end device 12 will demodulate the received modulated signal. This process will produce a certain degree of signal attenuation, and different lengths of transmission lines or different types of front-end image acquisition devices 11 will produce different degrees of signal attenuation. The digital signal is transmitted by superimposing the communication protocol on the transmission line, and there is no need for modulation and demodulation steps. The back-end device 12 can directly read the digital signal, thereby avoiding signal attenuation as much as possible.

[0027] In the above scheme, the image processing system 10 obtains parameter information of the representative area in the original image, and obtains the image to be processed obtained by transmitting the original image through the transmission line; wherein the parameter information includes the representative image parameters of the representative area; and obtains the target image parameters of the target area in the image to be processed, the target area is the area in the image to be processed corresponding to the position of the representative area, and then based on the first difference between the representative image parameters and the target image parameters, the style of the image to be processed is adjusted. On the one hand, the image to be processed is obtained by transmitting the original image through the transmission line, and the attenuation generated by the transmission lines with different line lengths during the signal transmission process can be reflected in the form of the first difference, and then the style of the image to be processed is adjusted in a targeted manner based on the first difference to achieve compensation for the attenuated image signal, which can improve the effect of restoring the image to be processed to the original image, thereby improving the restoration degree of the image; on the other hand, by processing the image parameters of a part of the image to obtain the first difference, the efficiency of image processing can be improved compared with processing the entire image.

[0028] See also Figure 2 , Figure 2 This is a flowchart of the first embodiment of the image processing method of the present application, wherein the execution subject of the image processing method is the backend device 12 in the above-mentioned image processing system, specifically, it includes the following steps:

[0029] S21: Acquire parameter information of a representative area in an original image, and acquire an image to be processed obtained by transmitting the original image through a transmission line; wherein the parameter information includes representative image parameters of the representative area.

[0030] In the embodiment of the present disclosure, the original image is acquired by the front-end image acquisition device 11, and the format of the original image may include but is not limited to: YUV format, RGB format, etc. Among them, "Y" in the YUV format represents brightness (Luminance or Luma), "U" and "V" represent chrominance (Chrominance or Chroma), and the RGB format represents the colors of the three channels of red (Red), green (Green), and blue (Blue).

[0031] In the embodiment of the present disclosure, the image to be processed is obtained by transmitting the original image via a transmission line, and the format of the image to be processed is consistent with the format of the original image. As a possible example, the original image is in YUV format, and the image to be processed is also in YUV format.

[0032] In one implementation scenario, the image to be processed can be obtained by performing equalization compensation on the image data of the original image transmitted through the transmission line. Specifically, equalization compensation (EQ, Equalizer) refers to using a compensation level table to compensate for the data after being transmitted through the transmission line. The compensation level table includes multiple compensation gears, and each compensation gear has a set of default image parameters. After determining the attenuation degree of the image data of the original image after being transmitted through the transmission line, the compensation level table is compared to determine the compensation gear that needs to be compensated for the current attenuation degree, and then the original image after being transmitted through the transmission line is adjusted by the default image parameters of the corresponding compensation gear to achieve equalization compensation. Therefore, after the back-end device 12 receives the image data of the original image transmitted by the front-end image acquisition device 11 through the transmission line, the image data of the original image is equalized and compensated to obtain the image to be processed, and the distorted original image can be compensated for the corresponding level according to the attenuation degree, which helps to further improve the restoration degree from the image to be processed to the original image. Of course, the original image after being transmitted through the transmission line can also be directly used as the image to be processed, and the image to be processed is not specifically limited here.

[0033] In one implementation scenario, the representative area is selected from a plurality of area units obtained by dividing the original image by the front-end image acquisition device 11. The specific process can be referred to the relevant description in the second embodiment of the following image processing method, which will not be described here.

[0034] In a specific implementation scenario, the parameter information includes representative image parameters of the representative area, and the representative image parameters include parameter values ​​of the representative area with respect to at least one parameter factor, wherein the at least one parameter factor includes at least one of hue, saturation, and brightness. In addition, the parameter factors may also include, but are not limited to: brightness, luminosity, etc. Specifically, the representative image parameters include parameter values ​​of each pixel point in the representative area with respect to at least one parameter factor, and the representative area may include N*N pixel points, or the representative area may include M*N pixel points.

[0035] As a possible example, when the original image and the image to be processed are in YUV format, the representative image parameters can be obtained based on the image parameters of the representative area after the original image is converted to HSB format, wherein the image parameters of the representative area in HSB format include parameter factors: hue, saturation, and brightness, and then the representative image parameters can be obtained including parameter values ​​of the representative area regarding hue, saturation, and brightness. In addition, the representative image parameters can be obtained based on the image parameters of the representative area after the original image in YUV format is converted to HSL format, wherein the image parameters of the representative area in HSL format include parameter factors: hue, saturation, and lightness, and then the representative image parameters can be obtained including parameter values ​​of the representative area regarding hue, saturation, and lightness. In addition, the representative image parameters can also be obtained directly based on the image parameters in YUV format, wherein the representative image parameters include parameter values ​​of the representative area regarding brightness (Y) and hue (U, V).

[0036] In a specific implementation scenario, the representative area is the area unit with the largest saturation representation value in the original image. The process of determining the saturation representation value can refer to the relevant description in the second embodiment of the following image processing method, which will not be repeated here.

[0037] In a specific implementation scenario, the parameter information further includes region parameters of the representative region, and the region parameters include position information and / or size information of the representative region in the original image.

[0038] In a specific implementation scenario, the parameter information representing the area in the original image is in the form of a digital signal. In this case, the back-end device 12 can directly read the digital signal transmitted by the transmission line, which can avoid signal attenuation caused by the signal during the transmission process of the transmission line as much as possible, thereby improving the robustness of image processing.

[0039] S22: Obtain target image parameters of a target area in the image to be processed, where the target area is an area in the image to be processed corresponding to a position of the representative area.

[0040] In one implementation scenario, the parameter information includes region parameters of the representative region, and the region parameters include the position information and / or size information of the representative region in the original image. The target region corresponding to the representative region is determined from the image to be processed through the region parameters. Specifically, the corresponding position in the image to be processed is located through the position information of the representative region in the original image to obtain the target region of the image to be processed. In addition, the region parameters may also include size information. Obtaining the target region from the region position and region size levels helps to improve the accuracy of the target region positioning. As a possible example, see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of an image to be processed in the present application, wherein the frame area is a target area, and the target area is determined by the area parameters of the representative area.

[0041] In one implementation scenario, the target image parameter includes a parameter value of the target area with respect to at least one parameter factor, wherein the at least one parameter factor includes at least one of hue, saturation and brightness. In addition, the parameter factor may also include but is not limited to: brightness, luminosity, etc.

[0042] In a specific implementation scenario, the target image parameter includes a parameter value of each pixel in the target area with respect to at least one parameter factor. As a possible example, the number of pixels in the target area is consistent with the number of pixels in the representative area, that is, the target area may include N*N pixels, or the target area may also include M*N pixels.

[0043] In one implementation scenario, when the original image and the image to be processed are in YUV format, the representative image parameters can be obtained based on the image parameters of the representative area after the original image is converted into HSB format. Accordingly, after the back-end device 12 obtains the image to be processed, the image to be processed can be converted into HSB format, and the image parameters of the target area in the image to be processed in HSB format can be obtained to obtain the target image parameters, wherein the target image parameters include parameter factors: hue, saturation and brightness.

[0044] S23: Based on a first difference between the representative image parameter and the target image parameter, perform style adjustment on the image to be processed.

[0045] In an implementation scenario, both the representative image parameters and the target image parameters include parameter values ​​regarding at least one parameter factor, and each parameter factor is taken as the current parameter factor. The current parameter factor is gradually adjusted for the processed image, so that the first difference between the target image parameters corresponding to the finally adjusted processed image and the representative image parameters regarding the current parameter factor satisfies the restoration condition, thereby achieving style adjustment of the processed image based on the first difference between the representative image parameters and the target image parameters. By gradually adjusting the current parameter factor for the processed image, the style of the processed image can be gradually brought close to the original image through a positive adjustment method. Compared with directly compensating the processed image, the image restoration degree can be improved.

[0046] In a specific implementation scenario, the representative image parameters include the parameter values ​​of each pixel in the representative area with respect to at least one parameter factor, and the target image parameters include the parameter values ​​of each pixel in the target area with respect to at least one parameter factor, wherein the first difference between the target image parameters and the representative image parameters with respect to the current parameter factor is the statistical value of the second difference of each pixel, and the second difference of each pixel is the difference between the parameter value of each pixel of the target image parameter with respect to the current parameter factor and the parameter value of the corresponding pixel in the representative image parameter with respect to the current parameter factor. Therefore, obtaining the first difference between the target image parameters and the representative image parameters with respect to the current parameter factor from the second difference between the target area and the representative area at the pixel level can improve the granularity of the first difference determination, which helps to further improve the image restoration degree.

[0047] As a possible example, please refer to Table 1 and Table 2. Table 1 shows the parameter values ​​of hue, saturation and brightness of the six pixels in the representative area, and Table 2 shows the parameter values ​​of hue, saturation and brightness of the six pixels in the corresponding representative area in the target area. Among them, the parameter values ​​of hue, saturation and brightness of the six pixels in the representative area are: , and (n=1, 2, 3, 4, 5, 6), the parameter values ​​of hue, saturation and brightness of the six pixels in the target area are: , , (n=1, 2, 3, 4, 5, 6).

[0048] Table 1: Parameter values ​​of hue, saturation and brightness of the six pixels in the representative area

[0049]

[0050] Table 2: Parameter values ​​of hue, saturation and brightness of the six pixels in the target area corresponding to the representative area

[0051]

[0052] Please refer to Table 3, which shows the second differences between the parameter values ​​of each pixel of the target image parameter with respect to chroma, saturation and brightness and the parameter values ​​of the corresponding pixel in the representative image parameter with respect to chroma, saturation and brightness, that is, when chroma, saturation and brightness are used as the current parameter factors, the second differences between the parameter values ​​of each pixel of the target image parameter with respect to the current parameter factor and the parameter values ​​of the corresponding pixel in the representative image parameter with respect to the current parameter factor are respectively: =( )、 =( )、 =( ).

[0053] Table 3: Second differences between the parameter values ​​of hue, saturation and brightness of each pixel of the target image parameter and the parameter values ​​of hue, saturation and brightness of the corresponding pixel in the representative image parameter

[0054]

[0055] The first difference between the target image parameter and the representative image parameter regarding the current parameter factor is the statistical value of the second difference of each pixel. For example, the statistical value of the second difference of each pixel may be the average value of the second difference of each pixel. Thus, the first difference between the target image parameter and the representative image parameter regarding chromaticity is:

[0056] ;

[0057] The first difference between the target image parameters and the representative image parameters with respect to saturation is:

[0058] ;

[0059] The first difference between the target image parameters and the representative image parameters with respect to brightness is:

[0060] .

[0061] In a specific implementation scenario, in order to achieve gradual adjustment of the current parameter factor of the image to be processed so that the first difference between the target image parameters corresponding to the finally adjusted image to be processed and the representative image parameters regarding the current parameter factor meets the restoration condition, the first difference between the current target image parameters and the representative image parameters regarding the current parameter factor can be obtained, and when the current first difference does not meet the restoration condition, the current parameter factor of the image to be processed is adjusted with the target adjustment amplitude, and then the target image parameters of the target area in the adjusted image to be processed are obtained, and based on the newly obtained target image parameters, the above-mentioned steps of obtaining the first difference between the current target image parameters and the representative image parameters regarding the current parameter factor and subsequent steps are re-executed until the current first difference meets the restoration condition. Among them, the target adjustment amplitude can be the minimum step value of the register. For example, the parameter factors include chroma, saturation and brightness, and the register includes three registers for adjusting chroma, saturation and brightness respectively. Then, according to the minimum step value of the register, the register value corresponding to the current parameter factor is adjusted, and there is a corresponding relationship between the minimum step value of each register and the parameter value of chroma, saturation and brightness respectively. For example, the minimum step value of the register can correspond to 1, 2 or 3 parameter values ​​of chroma, saturation or brightness, etc. In addition, the restoration condition corresponding to each parameter factor is that the difference corresponding to the parameter factor is less than the threshold value corresponding to the parameter factor. For example, the restoration condition corresponding to chroma is that the first difference corresponding to chroma is less than the chroma deviation threshold value T1, the restoration condition corresponding to saturation is that the first difference corresponding to saturation is less than the saturation deviation threshold value T2, and the restoration condition corresponding to brightness is that the first difference corresponding to brightness is less than the brightness deviation threshold value T3. The values ​​of T1, T2 and T3 can be 1, 2, 3, etc., and examples are not given one by one here. Therefore, by gradually adjusting the image to be processed, after each adjustment, the parameter value of each pixel in the image to be processed with respect to the current parameter factor changes towards being closer and closer to the parameter value of the corresponding pixel in the original image with respect to the current parameter factor until the restoration condition is met, thereby being able to restore the image to be processed as realistically as possible and improving the effect of image style restoration.

[0062] As a possible example, referring to the first differences obtained in Tables 1, 2, and 3 above, i.e., the first difference in chromaticity is 3.5, the first difference in saturation is -34.5, and the first difference in brightness is 20.8, firstly, the image to be processed is gradually adjusted in terms of chromaticity, and the restoration condition of chromaticity is that the first difference in chromaticity is less than the chromaticity difference threshold 1, i.e., the current first difference 3.5 does not satisfy the chromaticity difference threshold 1 of the restoration condition, and when the minimum step value of the register for adjusting the chromaticity corresponds to one parameter value of the chromaticity, the first difference 3.5 in chromaticity can be adjusted to 0.5 by gradually adjusting the register three times, and 0.5 is less than the chromaticity difference threshold 1, thereby satisfying the restoration condition; or, when the minimum step value of the register for adjusting the chromaticity corresponds to three parameter values ​​of the chromaticity, the first difference 3.5 in chromaticity can be adjusted to 0.5 by adjusting the register once, and 0.5 is less than the chromaticity difference threshold 1, thereby satisfying the restoration condition. After the first difference in chromaticity satisfies the restoration condition, the saturation and brightness are respectively used as current parameter factors for stepwise adjustment, and the specific process is similar to the process of stepwise adjustment of chromaticity as the current parameter factor, which will not be repeated here. It should be noted that the order of stepwise adjustment of the current parameter factors for the image to be processed is not limited, for example, the saturation may be adjusted first or the brightness may be adjusted first.

[0063] The above scheme obtains parameter information of the representative area in the original image, and obtains the image to be processed obtained by transmitting the original image through the transmission line; wherein the parameter information includes the representative image parameters of the representative area; and obtains the target image parameters of the target area in the image to be processed, the target area is the area in the image to be processed corresponding to the position of the representative area, and then based on the first difference between the representative image parameters and the target image parameters, the style of the image to be processed is adjusted. On the one hand, the image to be processed is obtained by transmitting the original image through the transmission line, and the attenuation generated by the transmission lines with different line lengths during the signal transmission process can be reflected in the form of the first difference, and then the style of the image to be processed is adjusted in a targeted manner based on the first difference to achieve compensation for the attenuated image signal, which can improve the effect of restoring the image to be processed to the original image, thereby improving the restoration degree of the image; on the other hand, by processing the image parameters of a part of the image to obtain the first difference, the efficiency of image processing can be improved compared with processing the entire image.

[0064] See also Figure 4 , Figure 4This is a flow chart of the second embodiment of the image processing method of the present application. In the embodiment of the present disclosure, the execution subject of the image processing method is the front-end image acquisition device 11. The embodiment of the present disclosure mainly describes the different parts from the above-mentioned embodiment. The parts related to the original image, representative area, area parameters, representative image parameters, image to be processed, target area and target image parameters, etc., which are the same as those in the above-mentioned embodiment, are not described in detail in the embodiment of the present disclosure. Specifically, the embodiment of the present disclosure includes the following steps:

[0065] S41: Divide the original image to be transmitted into a plurality of area units.

[0066] In an implementation scenario, the original image to be transmitted is acquired by the front-end image acquisition device 11, and the front-end image acquisition device 11 divides the original image into a plurality of area units.

[0067] In a specific implementation scenario, each area unit has the same size and includes the same number of pixels. Figure 5 , Figure 5 This is a schematic diagram of an embodiment of a regional unit of the present application. Each regional unit includes N pixels in the horizontal dimension and the vertical dimension, and the total number of pixels in the regional unit is N*N. Of course, the number of pixels included in the horizontal dimension and the vertical dimension of the regional unit may be different. For example, each regional unit includes M pixels in the horizontal dimension and N pixels in the vertical dimension, and the total number of pixels in the regional unit is M*N. In addition, in order to further improve the granularity of regional division, when dividing the regional units, the region with similar pixel colors can be selected as a regional unit as much as possible. It should be noted that M and N can be any values ​​such as 1, 2, 3, 4, etc., and are not specifically limited here.

[0068] In one implementation scenario, the representative image parameter of the representative region includes the parameter value of each pixel in the representative region with respect to at least one parameter factor. Specifically, the at least one parameter factor includes at least one of hue, saturation and brightness. In addition, the parameter factor may also include but is not limited to: brightness, luminosity, etc.

[0069] S42: Select a representative region from the plurality of region units.

[0070] In an implementation scenario, by obtaining the parameter representation value of each area unit with respect to the target parameter factor, the area unit whose parameter representation value with respect to the target parameter factor meets the representative requirement is selected as the representative area. Preferably, the target parameter factor is saturation, and the area unit with the largest saturation representation value is used as the representative area. Therefore, based on the determination of the representative area in the original image, the image parameters of a part of the image are processed, which can improve the efficiency of image processing compared to processing the entire image.

[0071] In a specific implementation scenario, the parameter representation value of the regional unit with respect to the target parameter factor is obtained by statistically analyzing the parameter values ​​of each pixel in the regional unit with respect to the target parameter factor. Exemplarily, the parameter representation value of the target parameter factor may be the maximum parameter mean of each pixel in the regional unit with respect to the target parameter factor, or it may be the parameter value of the target parameter factor of the pixel at the center of the regional unit. The method for obtaining the parameter representation value of the regional unit with respect to the target parameter factor is not limited here. Preferably, the target parameter factor is saturation, and the regional unit with the largest parameter mean of each pixel in the regional unit with respect to saturation is taken as the representative region. Therefore, obtaining the parameter representation value of the target parameter factor from the level of pixels in the regional unit can improve the granularity of the image parameters.

[0072] In a specific implementation scenario, the original image is in YUV format. Before obtaining the parameter representation value of each area unit with respect to the target parameter factor, the original image can be converted into HSB format, and then the parameter representation value of each area unit in the original image in HSB format with respect to the target parameter factor is obtained, and the area unit whose parameter representation value of the target parameter factor in HSB format meets the representative requirements is selected as the representative area. Among them, each area unit in the original image in HSB format with respect to the target parameter factor can be any one of chroma, saturation, and brightness. Therefore, by determining the representative area based on converting the original image from YUV format to HSB format, a more refined adjustment of the image color can be achieved by adjusting the three dimensions of chroma, brightness, and saturation.

[0073] As a possible example, the parameter representation value of the regional unit with respect to the target parameter factor in the HSB format is obtained by statistically analyzing the parameter values ​​of each pixel in the regional unit with respect to the target parameter factor. Specifically, it may be the maximum parameter mean of each pixel in the regional unit with respect to the target parameter factor, and each regional unit includes N*N pixels, wherein the parameter mean of each regional unit with respect to chromaticity is H1, the parameter mean of each regional unit with respect to saturation is S1, and the parameter mean of each regional unit with respect to brightness is B1, that is:

[0074] H1 = chromaticity value of all pixels in any area unit / (N*N);

[0075] S1 = saturation of all pixels in any area unit / (N*N);

[0076] B1 = brightness value of all pixels in any area unit / (N*N).

[0077] When chroma is used as the target parameter factor, the regional unit with the largest H1 value can be used as the representative area; when saturation is used as the target parameter factor, the regional unit with the largest S1 value can be used as the representative area; when brightness is used as the target parameter factor, the regional unit with the largest B1 value can be used as the representative area.

[0078] S43: Transmitting the original image and parameter information of the representative area in the original image to the back-end device via the transmission line, wherein the parameter information includes representative image parameters of the representative area, and the back-end device can restore the original image based on the data received via the transmission line.

[0079] In one implementation scenario, the original image is transmitted to the back-end device 12 via a transmission line in the form of an analog signal, and the parameter information of the representative area in the original image is transmitted to the back-end device 12 via a transmission line in the form of a digital signal, so that the back-end device 12 can directly read the parameter information in the form of a digital signal, and restore the original image that has been attenuated due to transmission in the form of an analog signal based on the parameter information of the representative area that has not been attenuated. It can adapt to transmission lines with different lengths or different types of front-end image acquisition devices 11 to compensate for the different degrees of distortion of the original image after being transmitted through the transmission line, thereby improving the accuracy of restoring the image to obtain the original image.

[0080] The above scheme divides the original image to be transmitted into multiple area units, selects representative areas from the multiple area units, and then transmits the original image and parameter information of the representative area in the original image to the back-end device through the transmission line. The parameter information includes representative image parameters of the representative area. The back-end device can restore the original image based on the data received through the transmission line. On the one hand, the image to be processed is obtained by transmitting the original image through the transmission line, and the attenuation generated by the transmission lines with different line lengths during the signal transmission process can be reflected in the form of a first difference. Then, based on the first difference, the style of the image to be processed is adjusted in a targeted manner to achieve compensation for the attenuated image signal, which can improve the effect of restoring the image to be processed to the original image, thereby improving the restoration degree of the image; on the other hand, by processing the image parameters of a part of the image to obtain the first difference, the efficiency of image processing can be improved compared to processing the entire image.

[0081] See also Figure 6 , Figure 6This is a schematic diagram of the framework of an embodiment of an electronic device of the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, and the processor 62 is used to execute program instructions stored in the memory 61 to implement the steps in any of the above-mentioned image processing method embodiments. Specifically, the electronic device 60 may include, but is not limited to: a network camera, an infrared camera, a coaxial high-definition video recorder (XVR), a digital video recorder (DVR), etc., which are not limited here.

[0082] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps of any of the above-mentioned answer status evaluation method embodiments. The processor 62 can also be called a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.

[0083] In the above scheme, the electronic device 60 obtains parameter information of the representative area in the original image, and obtains the image to be processed obtained by transmitting the original image through the transmission line; wherein the parameter information includes the representative image parameters of the representative area; and obtains the target image parameters of the target area in the image to be processed, the target area is the area in the image to be processed corresponding to the position of the representative area, and then based on the first difference between the representative image parameters and the target image parameters, the style of the image to be processed is adjusted. On the one hand, the image to be processed is obtained by transmitting the original image through the transmission line, and the attenuation generated by the transmission lines with different line lengths during the signal transmission process can be reflected in the form of the first difference, and then the style of the image to be processed is adjusted in a targeted manner based on the first difference to achieve compensation for the attenuated image signal, which can improve the effect of restoring the image to be processed to the original image, thereby improving the restoration degree of the image; on the other hand, by processing the image parameters of a part of the image to obtain the first difference, the efficiency of image processing can be improved compared with processing the entire image.

[0084] See also Figure 7 , Figure 7The computer-readable storage medium 70 stores program instructions 71 that can be executed by a processor, and the program instructions 71 are used to implement the steps of the above-mentioned image processing method embodiment.

[0085] In the above scheme, the computer-readable storage medium 70 obtains parameter information of the representative area in the original image, and obtains the image to be processed obtained by transmitting the original image through the transmission line; wherein the parameter information includes the representative image parameters of the representative area; and obtains the target image parameters of the target area in the image to be processed, the target area is the area corresponding to the position of the representative area in the image to be processed, and then based on the first difference between the representative image parameters and the target image parameters, the style of the image to be processed is adjusted. On the one hand, the image to be processed is obtained by transmitting the original image through the transmission line, and the attenuation generated by the transmission lines with different line lengths during the signal transmission process can be reflected in the form of the first difference, and then the style of the image to be processed is adjusted in a targeted manner based on the first difference to achieve compensation for the attenuated image signal, which can improve the effect of restoring the image to be processed to the original image, thereby improving the restoration degree of the image; on the other hand, by processing the image parameters of a part of the image to obtain the first difference, the efficiency of image processing can be improved compared with processing the entire image.

[0086] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation thereof can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0087] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

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

[0089] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0090] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0091] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

Claims

1. An image processing method, characterized in that: include: Acquire parameter information of a representative area in an original image, and acquire an image to be processed obtained by transmitting the original image through a transmission line; wherein the parameter information includes representative image parameters of the representative area and position information of the representative area in the original image, and the parameter information is transmitted in the form of a digital signal; Acquire target image parameters of a target area in the image to be processed, where the target area is an area in the image to be processed corresponding to the position of the representative area; Based on a first difference between the representative image parameter and the target image parameter, style adjustment is performed on the image to be processed.

2. The method according to claim 1, characterized in that The representative image parameters and the target image parameters each include a parameter value related to at least one parameter factor; The step of adjusting the style of the image to be processed based on a first difference between the representative image parameter and the target image parameter comprises: Taking each of the parameter factors as the current parameter factor respectively; The image to be processed is gradually adjusted with respect to the current parameter factor, so that a first difference with respect to the current parameter factor between the target image parameter and the representative image parameter corresponding to the image to be processed after the final adjustment satisfies a restoration condition.

3. The method according to claim 2, characterized in that The representative image parameters include the parameter values ​​of each pixel point in the representative area with respect to the at least one parameter factor, and the target image parameters include the parameter values ​​of each pixel point in the target area with respect to the at least one parameter factor; wherein, The first difference between the target image parameter and the representative image parameter with respect to the current parameter factor is a statistical value of the second difference of each pixel, and the second difference of each pixel is a difference between a parameter value of each pixel of the target image parameter with respect to the current parameter factor and a parameter value of a corresponding pixel in the representative image parameter with respect to the current parameter factor; and / or, The stepwise adjustment of the image to be processed with respect to the current parameter factor so that a first difference between the target image parameter corresponding to the image to be processed and the representative image parameter with respect to the current parameter factor after the final adjustment satisfies a restoration condition includes: Obtaining a first difference between the current target image parameter and the representative image parameter with respect to the current parameter factor; In response to the first difference not satisfying the restoration condition, adjusting the image to be processed with respect to the current parameter factor by a target adjustment amplitude; Obtain the target image parameters of the target area in the adjusted image to be processed, and based on the newly acquired target image parameters, re-execute the steps of obtaining the first difference between the current target image parameters and the representative image parameters regarding the current parameter factor and its subsequent steps until the current first difference satisfies the restoration condition.

4. The method according to claim 3, characterized in that The step of adjusting the image to be processed with respect to the current parameter factor with a target adjustment amplitude includes: According to the minimum step value of the register, adjust the register value corresponding to the current parameter factor; And / or, the restoration condition corresponding to each of the parameter factors is that the difference corresponding to the parameter factor is less than a threshold value corresponding to the parameter factor.

5. The method according to any one of claims 1 to 4, characterized in that: The representative image parameter includes a parameter value of the representative area with respect to at least one parameter factor, and the target image parameter includes a parameter value of the target area with respect to the at least one parameter factor; The at least one parameter factor includes at least one of hue, saturation and brightness.

6. The method according to claim 1, characterized in that The representative area is the area unit with the largest saturation representation value in the original image; And / or, the parameter information further includes region parameters of the representative region, and the region parameters include size information of the representative region in the original image; Before acquiring the target image parameters of the target area in the image to be processed, the method further includes: Based on the region parameters, determining a target region corresponding to the representative region from the image to be processed; And / or, the original image and the image to be processed are in YUV format, the representative image parameters are obtained based on image parameters of the representative area after the original image is converted into HSB format, and the obtaining of target image parameters of the target area in the image to be processed includes: Convert the image to be processed into HSB format; Acquire image parameters of the target area in the image to be processed in the HSB format to obtain the target image parameters; And / or, the obtaining of parameter information of a representative area in an original image, and obtaining an image to be processed obtained by transmitting the original image via a transmission line, comprises: Receiving the parameter information and the image data of the original image transmitted by the front-end image acquisition device through the transmission line; Equalization compensation is performed based on the image data of the original image to obtain the image to be processed.

7. An image processing method, characterized in that: include: Dividing the original image to be transmitted into a plurality of area units; Selecting a representative area from the plurality of area units; The original image and parameter information of the representative area in the original image are transmitted to a back-end device via a transmission line, wherein the parameter information includes representative image parameters of the representative area and position information of the representative area in the original image. The parameter information is transmitted in the form of a digital signal, and the back-end device can restore the original image based on the data received via the transmission line.

8. The method according to claim 7, characterized in that The step of selecting a representative area from the plurality of area units comprises: Obtaining parameter representation values ​​of each of the regional units with respect to a target parameter factor; The regional unit whose parameter characterization value of the target parameter factor meets the representative requirement is selected as the representative region.

9. The method according to claim 8, characterized in that The parameter representation value of the regional unit with respect to the target parameter factor is obtained by statistically analyzing the parameter value of each pixel point in the regional unit with respect to the target parameter factor; And / or, the original image is in YUV format, and before obtaining the parameter representation value of each of the regional units with respect to the target parameter factor, it also includes: converting the original image into HSB format; and obtaining the parameter representation value of each of the regional units with respect to the target parameter factor includes: obtaining the parameter representation value of each of the regional units with respect to the target parameter factor in the original image in HSB format; And / or, the target parameter factor is saturation.

10. The method according to claim 7, characterized in that The representative image parameters of the representative area include parameter values ​​of each pixel point in the representative area with respect to at least one parameter factor.

11. The method according to claim 10, characterized in that The at least one parameter factor includes at least one of hue, saturation, and brightness.

12. The method according to claim 7, characterized in that The parameter information also includes the region parameters of the representative region, and the region parameters include the position information and size information of the representative region in the original image; And / or, each of the area units has the same size.

13. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the image processing method according to any one of claims 1 to 12.

14. An image processing system, characterized in that: It comprises a front-end image acquisition device and a back-end device, wherein the front-end image acquisition device is connected to the back-end device via a transmission line, the back-end device is used to implement the image processing method described in any one of claims 1 to 6, and the front-end image acquisition device is used to implement the image processing method described in any one of claims 7 to 12.

15. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the image processing method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Image difference identification method and device and storage medium

    CN110796157A

  • Image compensation method and system, hard disk video recorder and readable storage medium

    CN114245004A