CN106507079B - A kind of color rendition method and device - Google Patents

A kind of color rendition method and device Download PDF

Info

Publication number
CN106507079B
CN106507079B CN201610958211.5A CN201610958211A CN106507079B CN 106507079 B CN106507079 B CN 106507079B CN 201610958211 A CN201610958211 A CN 201610958211A CN 106507079 B CN106507079 B CN 106507079B
Authority
CN
China
Prior art keywords
image
signal lamp
video image
sub
value
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
Application number
CN201610958211.5A
Other languages
Chinese (zh)
Other versions
CN106507079A (en
Inventor
吴辉
肖乃瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201610958211.5A priority Critical patent/CN106507079B/en
Publication of CN106507079A publication Critical patent/CN106507079A/en
Application granted granted Critical
Publication of CN106507079B publication Critical patent/CN106507079B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a kind of color rendition method and device, this method comprises: the N frame video image in acquisition monitored picture;The video image that signal lamp is in designated state is selected from the N frame video image;Wherein, the designated state is in signal lamp handoff procedure, and the color of the signal lamp meets the state that display requires;Using the video image of the designated state, signal lamp color rendition is carried out to specific video image.Pass through the technical solution of the application, specific video image (i.e. the video image of signal lamp generation overexposure phenomenon) can be modified, realize the reasonable reduction in the excessively quick-fried region of signal lamp, efficiently solve the problems, such as that signal lamp is excessively quick-fried, the color of signal lamp is set to be more in line with actual demand, solving overexposure leads to signal lamp color distortion and contour distortion, inhibit the distortion of signal lamp and the diffusion of halation, the authenticity and reliability that evidence figure violating the regulations can be improved, meet the evidence figure demand of intelligent transportation solution.

Description

Color restoration method and device
Technical Field
The present application relates to the field of video surveillance technologies, and in particular, to a color restoration method and apparatus.
Background
In recent years, with the rapid development of computers, networks, image processing and transmission technologies, the popularization trend of video monitoring systems is more and more obvious, the video monitoring systems gradually advance to high-definition and intelligentization, and the video monitoring systems can be applied to numerous fields such as intelligent transportation, smart parks, safe cities and the like.
In a video monitoring system, front-end devices (such as a network camera, an analog camera, etc.) are important components, and the video monitoring system comprises a large number of front-end devices which acquire video images in various environments. If the front-end equipment collects the video image in a low-illumination environment, the quality of the video image is poor.
In order to effectively capture the traffic violation at the gate, the front-end device is usually installed in a fixed manner, that is, the installation height, position, direction and angle of the front-end device are all fixed, so that the scene of the video image acquired by the front-end device is also determined. However, with the difference of illumination intensity, the color center of the traffic light is in a low-illumination environment, and the red light is yellow and the green light is white due to overexposure, so that the problem that the evidence map is unreliable when the violation information is fed back is caused.
Disclosure of Invention
The application provides a color restoration method, which is applied to front-end equipment and comprises the following steps:
collecting N frames of video images in a monitoring picture, wherein N is more than or equal to 2;
selecting a video image with a signal lamp in a designated state from the N frames of video images; the designated state is a state that the color of the signal lamp meets the display requirement in the signal lamp switching process;
and utilizing the video image in the specified state to restore the color of the signal lamp of the specific video image.
The process of selecting the video image with the signal lamp in the designated state from the N frames of video images specifically includes: selecting M frames of video images in the signal lamp switching process from the N frames of video images; wherein M is greater than or equal to 1, and N is greater than or equal to M; determining the R value of a signal lamp area aiming at each frame of video image in the M frames of video images; and selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp area.
The process of selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp region specifically includes: determining an R value between a preset first threshold value R1 and a preset second threshold value R2 by using the R value of the signal lamp area; wherein the preset first threshold R1 is less than the preset second threshold R2; if the R value between the preset first threshold value R1 and the preset second threshold value R2 is one, determining a video image corresponding to the determined R value as a video image of which the signal lamp is in a specified state; if the number of the R values between the preset first threshold value R1 and the preset second threshold value R2 is at least two, one video image is selected from the video images corresponding to the determined at least two R values, and the selected video image is determined as the video image of the traffic light in the designated state.
The process of performing signal lamp color restoration on a specific video image by using the video image in the designated state specifically includes: replacing a second sub-image in the specific video image with a first sub-image in the video image in the designated state to obtain a video image with the restored signal lamp color; or, using the color information of the first sub-image in the video image in the specified state to correct the color information of the second sub-image in the specific video image so as to obtain the video image with the restored signal lamp color; wherein the first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of a signal light region in the specific video image.
The process of correcting the color information of the second sub-image in the specific video image by using the color information of the first sub-image in the video image in the specified state specifically includes: correcting the gray value of the second sub-image by using the gray value of the first sub-image and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the overexposure center position of a signal lamp area; and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
The application provides a color reduction device, is applied to on the front end equipment, the device includes:
the acquisition module is used for acquiring N frames of video images in the monitoring picture, wherein N is more than or equal to 2;
the selecting module is used for selecting the video images of the signal lamps in the designated state from the N frames of video images; wherein the designated state is: in the signal lamp switching process, the color of the signal lamp meets the state of display requirements;
and the restoration module is used for restoring the color of the signal lamp of the specific video image by using the video image in the specified state.
The selecting module is specifically configured to select M frames of video images in the signal lamp switching process from the N frames of video images in the process of selecting the video images with the signal lamps in the designated state from the N frames of video images; wherein M is greater than or equal to 1, and N is greater than or equal to M; determining the R value of a signal lamp area aiming at each frame of video image in the M frames of video images; and selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp area.
The selecting module is specifically configured to determine, by using the R value of the signal light region, an R value between a preset first threshold R1 and a preset second threshold R2 in a process of selecting, from the M frames of video images, a video image in which a signal light is in a designated state by using the R value of the signal light region, where the preset first threshold R1 is smaller than the preset second threshold R2; if the R value between the preset first threshold value R1 and the preset second threshold value R2 is one, determining a video image corresponding to the determined R value as a video image of which the signal lamp is in a specified state; if the number of the R values between the preset first threshold value R1 and the preset second threshold value R2 is at least two, one video image is selected from the video images corresponding to the determined at least two R values, and the selected video image is determined to be the video image of the signal lamp in the designated state.
The restoration module is specifically configured to, in a process of restoring the color of the signal lamp to the specific video image by using the video image in the designated state, replace the second sub-image in the specific video image with the first sub-image in the video image in the designated state to obtain the video image with the restored color of the signal lamp; or, using the color information of the first sub-image in the video image in the specified state to correct the color information of the second sub-image in the specific video image so as to obtain the video image with the restored signal lamp color; wherein the first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of a signal light region in the specific video image.
The restoration module is specifically configured to, in a process of correcting color information of a second sub-image in the specific video image by using color information of a first sub-image in the video image in the designated state, correct a gray scale value of the second sub-image by using a gray scale value of the first sub-image for an overexposure center position of the signal lamp region, and correct an R value of the second sub-image by using an R value of the first sub-image; and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
Based on the technical scheme, in the embodiment of the application, specific video images (namely the video images of the signal lamp over-exposure phenomenon) can be corrected, reasonable restoration of the signal lamp over-explosion area is realized, the problem of over-explosion of the signal lamp is effectively solved, the color of the signal lamp is enabled to meet the actual requirement, the problems of color distortion, contour distortion and the like of the signal lamp caused by over-exposure are solved, the distortion of the signal lamp and the diffusion of halation are inhibited, the authenticity and the reliability of an evidence violation graph can be improved, and the evidence graph requirement of an intelligent traffic solution is met.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a flow chart of a color reduction method in one embodiment of the present application;
FIGS. 2A-2D are schematic diagrams of an application scenario in an embodiment of the present application;
FIG. 3 is a hardware block diagram of a head end device in one embodiment of the present application;
fig. 4 is a block diagram of a color reproduction apparatus according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a color reduction method, which can be applied to front-end equipment (such as a network camera, an analog camera and the like) and is used for performing color reduction on a video image acquired by the front-end equipment. Referring to fig. 1, which is a flow chart of the color restoration method, the method may include the following steps:
step 101, collecting N frames of video images in a monitoring picture, wherein N is more than or equal to 2.
102, selecting a video image with a signal lamp in a specified state from the N frames of video images; wherein, the appointed state is a state that the color of the signal lamp meets the display requirement in the signal lamp switching process.
And 103, restoring the color of the signal lamp of the specific video image by using the video image in the specified state. The specific video image includes, but is not limited to, a video image with a signal lamp in an overexposed state.
In an example, the execution sequence is only an example given for convenience of description, and in practical applications, the execution sequence between the steps may also be changed, and the execution sequence is not limited.
In an example, the N frames of video images may refer to N frames of video images within one statistical period, that is, N frames of video images within the monitoring screen are collected in each statistical period. In different statistical periods, the number of N may be the same or different, and in the embodiment of the present application, this is not limited.
Each statistical period may be a switching period of the signal lamp, such as switching from a red light (the red light is just lit) to a green light, switching from the green light to a yellow light, and switching from the yellow light to the red light (the red light is just lit). For example, for a signal light that goes out, one switching period may be: the red light is on (the red light is just turned on), the red light is turned off, the green light is turned on, the green light is turned off, the yellow light is turned on, the yellow light is turned off, and the red light is turned on (the red light is just turned on). For another example, for a signal lamp that will not go out, one switching period may be: the red light is on (the red light is just turned on), the green light is on, the yellow light is on, and the red light is on (the red light is just turned on).
For step 101, in one example, in order to obtain a video image of the traffic light in a specified state, the larger the frame rate of the video image captured by the front-end device, the better. Based on this, in the embodiment of the present application, a high frame rate acquisition module may be configured on the front-end device, and the high frame rate acquisition module is used to acquire the video image in the monitoring screen. The high frame rate acquisition module can acquire video images in the monitoring picture by using frame rates of 60 frames and more than 60 frames, so that the video images of the signal lamp in a specified state can be acquired.
With respect to step 102, in an example, the process of "selecting a video image with a signal lamp in a specified state from N frames of video images" may include, but is not limited to: selecting M frames of video images in the signal lamp switching process from the N frames of video images; wherein M is greater than or equal to 1, and N is greater than or equal to M. And determining the R value of the signal lamp area aiming at each frame of video image in the M frames of video images. And selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp area.
In the process of "selecting M frames of video images during the signal lamp switching process from N frames of video images", the N frames of video images are N frames of video images within a statistical period, and the statistical period is a switching period of the signal lamp, for example, switching from a red light (the red light is just lighted) to a green light, then switching from the green light to a yellow light, and then switching from the yellow light to the red light (the red light is just lighted). Based on this, for the N frames of video images acquired in the statistical period, M frames of video images in the signal lamp switching process can be selected from the video images. For example, assuming that color restoration needs to be performed on a signal lamp in a red light state, M frames of video images when a yellow light is switched to a red light, such as M frames of video images during a process from turning off the yellow light to turning on the red light, may be selected. Assuming that color restoration is required for the signal lamp in the green light state, M frames of video images when the red light is switched to the green light, for example, M frames of video images during the process from the red light being turned off to the green light being turned on, may be selected. Assuming that color restoration needs to be performed on the signal lamp in the yellow light state, M frames of video images when the green light is switched to the yellow light, for example, M frames of video images in the process from turning off the green light to turning on the yellow light, may be selected.
In the process of determining the R value of the traffic light region, the traffic light region needs to be determined before determining the R value of the traffic light region. For the determination process of the signal lamp region, coordinates of the signal lamp region, such as coordinates of four points of the signal lamp region (e.g., coordinates of a pixel point at the upper left corner, coordinates of a pixel point at the lower left corner, coordinates of a pixel point at the upper right corner, and coordinates of a pixel point at the lower right corner) may be configured on the front-end device. Based on the coordinates of these four points, the front-end device can know the signal light area. Moreover, because the front-end device is usually installed in a fixed manner, that is, the installation height, position, direction and angle of the front-end device are all fixed, the scene of the video image acquired by the front-end device is also determined. Therefore, in the video image collected by the front-end equipment, the position of the signal lamp in the video image is fixed, and the signal lamp is located in the signal lamp area.
For the process of "determining the R value of the signal lamp region", after obtaining M frames of video images in the signal lamp switching process, for each frame of video image in the M frames of video images, the RGB (Red Green Blue, Red, Green, Blue) value of the signal lamp region may be determined, and then the R value, that is, the Red value, of the signal lamp region is determined based on the RGB value of the signal lamp region. After the video image is obtained, for the signal lamp area of the video image, the method for determining the RGB value and the R value of the signal lamp area is not described herein again.
The process of selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp region may include, but is not limited to, the following ways: and determining the R value between a preset first threshold R1 and a preset second threshold R2 by using the R value of the signal lamp region, wherein the preset first threshold R1 is smaller than the preset second threshold R2. If the R value between the preset first threshold value R1 and the preset second threshold value R2 is one, determining a video image corresponding to the determined R value as a video image of which the signal lamp is in a specified state. If the number of the R values between the preset first threshold value R1 and the preset second threshold value R2 is at least two, one video image is selected from the video images corresponding to the determined at least two R values, and the selected video image is determined as the video image of the traffic light in the designated state.
In one example, the designated state is a state in which the color of the traffic light meets the display requirement during the switching process of the traffic light, that is, when the traffic light is in the designated state, the color display effect of the image in the traffic light region is good in the video image, and the problems such as overexposure do not occur.
In order to determine the video image in the designated state, a preset first threshold R1 and a preset second threshold R2 may be configured on the front-end device, both the preset first threshold R1 and the preset second threshold R2 may be configured according to practical experience, and when the R value of the traffic light region is between the preset first threshold R1 and the preset second threshold R2, it is indicated that the color display effect of the image in the traffic light region is good, and the problem of overexposure does not occur.
As shown in fig. 2A, as an example of the video image for determining the designated state, when the R value of the traffic light region is between the preset first threshold R1 and the preset second threshold R2, it is illustrated that the color display effect of the image of the traffic light region is good. In practical application, the front-end device acquires the video images in the monitoring screen through the high-frame-rate acquisition module, so that the video images of the signal lamp in the designated state can be acquired, that is, the R value of the acquired signal lamp area is between the preset first threshold R1 and the preset second threshold R2.
Further, if the R value between the preset first threshold R1 and the preset second threshold R2 is one, the video image corresponding to the determined R value may be directly determined as the video image of the traffic light in the designated state. If the number of R values between the preset first threshold R1 and the preset second threshold R2 is at least two, one video image may be selected from the video images corresponding to the at least two determined R values (for example, a middle video image is selected, or a first video image is selected, or a last video image is selected, and the selected one video image is determined as the video image of the traffic light in the designated state.
With respect to step 103, in an example, the process of "performing signal light color restoration on a specific video image (i.e. a video image with a signal light in an overexposed state) by using a video image in a specified state" may include, but is not limited to, the following ways: in the first mode, the first sub-image in the video image in the designated state is used for replacing the second sub-image in the specific video image so as to obtain the video image with the restored signal lamp color. Or, in the second mode, the color information of the first sub-image in the video image in the designated state is used for correcting the color information of the second sub-image in the specific video image, so as to obtain the video image with the restored signal lamp color. The first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of the signal light region in the specific video image.
For the first method, for the determination process of the signal lamp region, coordinates of the signal lamp region, such as coordinates of four points of the signal lamp region (e.g., coordinates of a pixel point at the upper left corner, coordinates of a pixel point at the lower left corner, coordinates of a pixel point at the upper right corner, and coordinates of a pixel point at the lower right corner) may be configured at the front-end device. Based on the coordinates of these four points, the front-end device can know the signal light area. The front-end device may acquire a first sub-image of the signal lamp region from the video image in the designated state, and acquire a second sub-image of the signal lamp region from the specific video image. Therefore, the front-end equipment can replace the second sub-image in the specific video image by using the first sub-image in the video image in the specified state to obtain the video image after the color of the signal lamp is restored.
For the second mode, the process of "using the color information of the first sub-image in the video image in the designated state to correct the color information of the second sub-image in the specific video image" may include, but is not limited to, the following modes: and correcting the gray value of the second sub-image by using the gray value of the first sub-image and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the overexposure center position of the signal lamp area. And correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
For the second method, for the determination process of the signal lamp region, coordinates of the signal lamp region, such as coordinates of four points of the signal lamp region (e.g., coordinates of a pixel point at the upper left corner, coordinates of a pixel point at the lower left corner, coordinates of a pixel point at the upper right corner, and coordinates of a pixel point at the lower right corner) may be configured at the front-end device. Based on the coordinates of these four points, the front-end device can know the signal light area. The front-end device may acquire a first sub-image of the signal lamp region from the video image in the designated state, and acquire a second sub-image of the signal lamp region from the specific video image. Thus, the front-end device may use the gray-scale value of the first sub-image to correct the gray-scale value of the second sub-image, and may use the R-value of the first sub-image to correct the R-value of the second sub-image.
For the process of determining the gray scale value and the R value of the first sub-image/the second sub-image, after each frame of video image is obtained, the RGB values of the first sub-image/the second sub-image may be determined, and then the gray scale value and the R value of the first sub-image/the second sub-image are determined based on the RGB values of the first sub-image/the second sub-image. The determination method of the gray-scale value and the R value of the first sub-image/the second sub-image is not described herein again.
In one example, the signal lamp area may include an overexposure center position and an overexposure contour position, where the overexposure center position is the center of the overexposure and the overexposure problem occurs when the red light is on. The position of the overexposed contour refers to the overexposed contour, and when the red light is on, the position of the overexposed contour has a chroma overflow effect (i.e. halo). As shown in fig. 2B, a schematic view of a traffic light region of a video image in a designated state, and as shown in fig. 2C, a schematic view of a traffic light region of a specific video image. In fig. 2C, the position indicated by the arrow is the overexposure center position of the signal lamp area, and at this overexposure center position, the overexposure problem for red currently occurs. In fig. 2C, the outline position of the arrow edge is the overexposed outline position of the signal light region, and in this overexposed outline position, the chroma overflow effect for red currently occurs.
In the embodiment of the present application, for the overexposure center position in the signal lamp region, the gray value of the second sub-image (i.e., the image at the overexposure center position in fig. 2C) is corrected by using the gray value of the first sub-image (i.e., the image at the overexposure center position in fig. 2B), and the R value of the second sub-image (i.e., the image at the overexposure center position in fig. 2C) is corrected by using the R value of the first sub-image (i.e., the image at the overexposure center position in. In addition, for the overexposure contour position of the signal lamp region, the R value of the second sub-image (i.e., the image of the overexposure contour position in fig. 2C) is corrected using the R value of the first sub-image (i.e., the image of the overexposure contour position in fig. 2B). The image with suppressed overexposure obtained through the above processing is shown in fig. 2D, and the red light effect is perfectly reflected.
In one example, for a signal lamp which goes out, in a video image of each color, the position of the overexposure center and the position of the overexposure outline are clear, and the front-end device can directly determine the position of the overexposure center and the position of the overexposure outline. For a signal lamp (generally, a multicolor lamp) which cannot be extinguished, the position of the overexposure center and the position of the overexposure outline are clear in a video image of a yellow lamp, and the position of the overexposure center and the position of the overexposure outline can be directly determined by front-end equipment, while the position of the overexposure center and the position of the overexposure outline are not clear in a video image of a red lamp/green lamp, so that the front-end equipment can adopt the position of the overexposure center and the position of the overexposure outline in the video image of the yellow lamp to position the position of the overexposure center and the position of the overexposure outline in.
It should be noted that the above process is described by taking the color reduction for red as an example, and the color reduction can be performed for other colors (green and yellow) in the same manner as described above. The color restoration process for each color will be described in detail below. In the example, green and yellow will be taken as an example.
With respect to step 102, in an example, the process of "selecting a video image with a signal lamp in a specified state from N frames of video images" may include, but is not limited to: selecting M frames of video images in the signal lamp switching process from the N frames of video images; wherein M is greater than or equal to 1, and N is greater than or equal to M. And determining the color value of the signal lamp area aiming at each frame of video image in the M frames of video images. And selecting the video image with the signal lamp in the designated state from the M frames of video images by using the color value of the signal lamp area.
In the process of "selecting M frames of video images in the signal lamp switching process from N frames of video images", assuming that color restoration needs to be performed on the signal lamp in the red light state, M frames of video images can be selected when switching from the yellow light to the red light. Assuming that the signal lamp in the green state needs to be color-restored, M frames of video images can be selected when the red light is switched to the green light. Assuming that the signal lamp in the yellow light state needs to be color-restored, M frames of video images can be selected when switching from green to yellow.
In the process of "determining the color value of the signal light region", the signal light region needs to be determined before the color value of the signal light region is determined. For the determination process of the signal lamp region, coordinates of the signal lamp region, such as coordinates of four points of the signal lamp region (e.g., coordinates of a pixel point at the upper left corner, coordinates of a pixel point at the lower left corner, coordinates of a pixel point at the upper right corner, and coordinates of a pixel point at the lower right corner) may be configured on the front-end device. Based on the coordinates of these four points, the front-end device can know the signal light area. Moreover, because the front-end device is usually installed in a fixed manner, that is, the installation height, position, direction and angle of the front-end device are all fixed, the scene of the video image acquired by the front-end device is also determined. Therefore, in the video image collected by the front-end equipment, the position of the signal lamp in the video image is fixed, and the signal lamp is located in the signal lamp area.
In the process of determining the color value of the signal lamp area, after the M frames of video images in the signal lamp switching process are obtained, the RGB value of the signal lamp area can be determined for each frame of video image in the M frames of video images, and then the color value of the signal lamp area is determined based on the RGB value of the signal lamp area.
The process of selecting the video image with the signal lamp in the designated state from the M frames of video images by using the color value of the signal lamp region may include, but is not limited to, the following ways: and determining a color value between a preset first threshold value and a preset second threshold value by using the color value of the signal lamp area, wherein the preset first threshold value is smaller than the preset second threshold value. If the color value between the preset first threshold and the preset second threshold is one, the video image corresponding to the determined one color value may be determined as the video image of the signal lamp in the designated state. If the number of the color values between the preset first threshold value and the preset second threshold value is at least two, one video image can be selected from the video images corresponding to the at least two determined color values, and the selected video image is determined as the video image of the signal lamp in the designated state.
With respect to step 103, in an example, the process of "performing signal light color restoration on a specific video image (i.e. a video image with a signal light in an overexposed state) by using a video image in a specified state" may include, but is not limited to, the following ways: in the first mode, the first sub-image in the video image in the designated state is used for replacing the second sub-image in the specific video image so as to obtain the video image with the restored signal lamp color. Or, in the second mode, the color information of the first sub-image in the video image in the designated state is used for correcting the color information of the second sub-image in the specific video image, so as to obtain the video image with the restored signal lamp color. The first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of the signal light region in the specific video image.
Regarding the second mode, the process of "using the color information of the first sub-image in the video image in the designated state to correct the color information of the second sub-image in the specific video image" includes, but is not limited to, the following modes: and correcting the gray value of the second sub-image by using the gray value of the first sub-image and correcting the color value of the second sub-image by using the color value of the first sub-image aiming at the overexposure center position of the signal lamp area. And correcting the color value of the second sub-image by using the color value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
In the above process, it is assumed that color reduction needs to be performed on the signal lamp in the red light state, that is, color reduction is performed on red, and the color value is also the R value. If color restoration needs to be performed on the signal lamp in the green state, that is, color restoration is performed on green, the color value is the G value, and a processing flow for the G value is similar to a processing flow for the R value, and details are not repeated here. Through the color restoration of green, the problems that the overexposure center position is overexposed when a green light is on and the chroma overflow effect (namely halo) occurs at the overexposure outline position can be solved. If color restoration needs to be performed on the signal lamp in the yellow lamp state, that is, color restoration is performed on yellow, the color value is the Y value, and a processing flow for the Y value is similar to a processing flow for the R value, and details are not repeated here. Through the color restoration of yellow, the problems of overexposure at the center of the overexposure when the yellow lamp is on and the chroma overflow effect at the outline position of the overexposure can be solved.
Based on the technical scheme, in the embodiment of the application, specific video images (namely the video images of the signal lamp over-exposure phenomenon) can be corrected, reasonable restoration of the signal lamp over-explosion area is realized, the problem of over-explosion of the signal lamp is effectively solved, the color of the signal lamp is enabled to meet the actual requirement, the problems of color distortion, contour distortion and the like of the signal lamp caused by over-exposure are solved, the distortion of the signal lamp and the diffusion of halation are inhibited, the authenticity and the reliability of an evidence violation graph can be improved, and the evidence graph requirement of an intelligent traffic solution is met.
Based on the same application concept as the method, the embodiment of the application also provides a color restoration device, and the color restoration device is applied to the front-end equipment. The color restoration device can be realized by software, or by hardware or a combination of hardware and software. Taking a software implementation as an example, the apparatus in a logical sense is formed by reading corresponding computer program instructions in the non-volatile memory through a processor of the front-end device where the apparatus is located. From a hardware aspect, as shown in fig. 3, for a hardware structure diagram of a front-end device where the color recovery apparatus provided by the present application is located, in addition to the processor and the nonvolatile memory shown in fig. 3, the front-end device may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; in terms of hardware structure, the front-end device may also be a distributed device, and may include a plurality of interface cards, so as to perform message processing extension at a hardware level.
As shown in fig. 4, a structural diagram of a color reproduction apparatus proposed in the present application includes:
the acquisition module 11 is used for acquiring N frames of video images in a monitoring picture, wherein N is more than or equal to 2;
a selecting module 12, configured to select a video image with a signal lamp in an assigned state from the N frames of video images; wherein the designated state is: in the signal lamp switching process, the color of the signal lamp meets the state of display requirements;
and the restoration module 13 is configured to perform signal lamp color restoration on the specific video image by using the video image in the designated state.
The selecting module 12 is specifically configured to select M frames of video images in the signal lamp switching process from the N frames of video images in the process of selecting the video image in which the signal lamp is in the designated state from the N frames of video images; the M is greater than or equal to 1, and the N is greater than or equal to the M; determining the R value of a signal lamp area aiming at each frame of video image in the M frames of video images; and selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp area.
The selecting module 12 is specifically configured to determine, by using the R value of the signal light region, an R value between a preset first threshold R1 and a preset second threshold R2 in a process of selecting, from the M frames of video images, a video image in which the signal light is in a designated state by using the R value of the signal light region, where the preset first threshold R1 is smaller than the preset second threshold R2; if the R value between the preset first threshold value R1 and the preset second threshold value R2 is one, determining a video image corresponding to the determined R value as a video image of which the signal lamp is in a specified state; if the number of the R values between the preset first threshold value R1 and the preset second threshold value R2 is at least two, one video image is selected from the video images corresponding to the determined at least two R values, and the selected video image is determined to be the video image of the signal lamp in the designated state.
The restoring module 13 is specifically configured to, in a process of restoring the color of the signal lamp to the specific video image by using the video image in the designated state, replace the second sub-image in the specific video image with the first sub-image in the video image in the designated state, so as to obtain a video image with the restored color of the signal lamp; or, using the color information of the first sub-image in the video image in the specified state to correct the color information of the second sub-image in the specific video image so as to obtain the video image with the restored signal lamp color; the first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of a signal light region in the specific video image.
In an example, the restoring module 13 is specifically configured to, in a process of correcting color information of a second sub-image in the specific video image by using color information of a first sub-image in the video image in the designated state, correct, for an overexposure center position of a signal lamp region, a gray scale value of the second sub-image by using a gray scale value of the first sub-image, and correct an R value of the second sub-image by using an R value of the first sub-image; and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application. Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules. The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The disclosure of the present application is only a few specific embodiments, but the present application is not limited to these, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (8)

1. A color restoration method applied to a front-end device, the method comprising:
collecting N frames of video images in a monitoring picture, wherein N is more than or equal to 2;
selecting a video image with a signal lamp in a designated state from the N frames of video images; the designated state is a state that the color of the signal lamp meets the display requirement in the signal lamp switching process;
utilizing the video image in the designated state to restore the color of the signal lamp of the specific video image;
the process of selecting the video image with the signal lamp in the designated state from the N frames of video images specifically includes: selecting M frames of video images in the signal lamp switching process from the N frames of video images; wherein M is greater than or equal to 1, and N is greater than or equal to M; determining the R value of a signal lamp area aiming at each frame of video image in the M frames of video images; and selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp area.
2. The method of claim 1,
the process of selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp region specifically includes:
determining an R value between a preset first threshold value R1 and a preset second threshold value R2 by using the R value of the signal lamp area; wherein the preset first threshold R1 is less than the preset second threshold R2;
if the R value between the preset first threshold value R1 and the preset second threshold value R2 is one, determining a video image corresponding to the determined R value as a video image of which the signal lamp is in a specified state;
if the number of the R values between the preset first threshold value R1 and the preset second threshold value R2 is at least two, one video image is selected from the video images corresponding to the determined at least two R values, and the selected video image is determined as the video image of the traffic light in the designated state.
3. The method according to claim 1, wherein the process of performing signal light color restoration on a specific video image by using the video image in the designated state specifically comprises:
replacing a second sub-image in the specific video image with a first sub-image in the video image in the designated state to obtain a video image with the restored signal lamp color; or,
correcting the color information of a second sub-image in the specific video image by using the color information of a first sub-image in the video image in the specified state to obtain a video image with the restored signal lamp color;
wherein the first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of a signal light region in the specific video image.
4. The method of claim 3,
the process of correcting the color information of the second sub-image in the specific video image by using the color information of the first sub-image in the video image in the specified state specifically includes:
correcting the gray value of the second sub-image by using the gray value of the first sub-image and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the overexposure center position of a signal lamp area;
and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
5. A color reproduction apparatus, for use in a front-end device, the apparatus comprising:
the acquisition module is used for acquiring N frames of video images in the monitoring picture, wherein N is more than or equal to 2;
the selecting module is used for selecting the video images of the signal lamps in the designated state from the N frames of video images; wherein the designated state is: in the signal lamp switching process, the color of the signal lamp meets the state of display requirements;
the restoration module is used for restoring the color of the signal lamp of the specific video image by utilizing the video image in the specified state;
the selecting module is specifically configured to select M frames of video images in the signal lamp switching process from the N frames of video images in the process of selecting the video images with the signal lamps in the designated state from the N frames of video images; wherein M is greater than or equal to 1, and N is greater than or equal to M; determining the R value of a signal lamp area aiming at each frame of video image in the M frames of video images; and selecting the video image with the signal lamp in the designated state from the M frames of video images by using the R value of the signal lamp area.
6. The apparatus of claim 5,
the selecting module is specifically configured to determine, by using the R value of the signal light region, an R value between a preset first threshold R1 and a preset second threshold R2 in a process of selecting, from the M frames of video images, a video image in which a signal light is in a designated state by using the R value of the signal light region, where the preset first threshold R1 is smaller than the preset second threshold R2; if the R value between the preset first threshold value R1 and the preset second threshold value R2 is one, determining a video image corresponding to the determined R value as a video image of which the signal lamp is in a specified state; if the number of the R values between the preset first threshold value R1 and the preset second threshold value R2 is at least two, one video image is selected from the video images corresponding to the determined at least two R values, and the selected video image is determined to be the video image of the signal lamp in the designated state.
7. The apparatus of claim 5,
the restoration module is specifically configured to, in a process of restoring the color of the signal lamp to the specific video image by using the video image in the designated state, replace the second sub-image in the specific video image with the first sub-image in the video image in the designated state to obtain the video image with the restored color of the signal lamp; or, using the color information of the first sub-image in the video image in the specified state to correct the color information of the second sub-image in the specific video image so as to obtain the video image with the restored signal lamp color; wherein the first sub-image is a sub-image of a signal light region in the video image of the specified state, and the second sub-image is a sub-image of a signal light region in the specific video image.
8. The apparatus according to claim 7, wherein the restoring module is specifically configured to, in the process of correcting color information of a second sub-image in the specific video image by using color information of a first sub-image in the video image in the designated state, correct a gray scale value of the second sub-image by using a gray scale value of the first sub-image and correct an R value of the second sub-image by using an R value of the first sub-image for an overexposure center position of a signal lamp area; and correcting the R value of the second sub-image by using the R value of the first sub-image aiming at the position of the overexposure contour of the signal lamp area.
CN201610958211.5A 2016-11-03 2016-11-03 A kind of color rendition method and device Active CN106507079B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610958211.5A CN106507079B (en) 2016-11-03 2016-11-03 A kind of color rendition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610958211.5A CN106507079B (en) 2016-11-03 2016-11-03 A kind of color rendition method and device

Publications (2)

Publication Number Publication Date
CN106507079A CN106507079A (en) 2017-03-15
CN106507079B true CN106507079B (en) 2019-08-27

Family

ID=58321452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610958211.5A Active CN106507079B (en) 2016-11-03 2016-11-03 A kind of color rendition method and device

Country Status (1)

Country Link
CN (1) CN106507079B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932696B (en) * 2017-05-26 2020-11-27 杭州海康威视数字技术股份有限公司 Signal lamp halo suppression method and device
CN111311500A (en) * 2018-12-12 2020-06-19 华为技术有限公司 Method and device for carrying out color restoration on image
CN112989891B (en) * 2019-12-17 2024-03-08 杭州海康威视数字技术股份有限公司 Signal lamp display state detection method and device
CN116152784B (en) * 2023-04-21 2023-07-07 深圳市夜行人科技有限公司 Signal lamp early warning method and system based on image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679733A (en) * 2013-12-18 2014-03-26 浙江宇视科技有限公司 Method and device for processing signal lamp image
CN104506779A (en) * 2014-12-24 2015-04-08 浙江宇视科技有限公司 Traffic lamp color correcting method and image pickup equipment
CN104574377A (en) * 2014-12-24 2015-04-29 南京金智视讯技术有限公司 Method for correcting yellow cast of red lamp of electronic police
CN105812674A (en) * 2014-12-29 2016-07-27 浙江大华技术股份有限公司 Signal lamp color correction method, monitoring method, and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679733A (en) * 2013-12-18 2014-03-26 浙江宇视科技有限公司 Method and device for processing signal lamp image
CN104506779A (en) * 2014-12-24 2015-04-08 浙江宇视科技有限公司 Traffic lamp color correcting method and image pickup equipment
CN104574377A (en) * 2014-12-24 2015-04-29 南京金智视讯技术有限公司 Method for correcting yellow cast of red lamp of electronic police
CN105812674A (en) * 2014-12-29 2016-07-27 浙江大华技术股份有限公司 Signal lamp color correction method, monitoring method, and device thereof

Also Published As

Publication number Publication date
CN106507079A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
US10467733B2 (en) Multiplexed high dynamic range images
CN106507079B (en) A kind of color rendition method and device
US9854188B2 (en) Calibration of defective image sensor elements
EP2854389B1 (en) Scene recognition method and apparatus
CN106651797B (en) Method and device for determining effective area of signal lamp
US10469814B2 (en) Image processing apparatus and method
US8605106B2 (en) Projector and color improvement method of the projector
US20160253792A1 (en) Guided color grading for extended dynamic range
US9544506B1 (en) Image processing method for image capturing device
CN111368819B (en) Light spot detection method and device
CN107507142B (en) Signal lamp image processing method
CN113299245A (en) Method and device for adjusting local backlight of display equipment, display equipment and storage medium
WO2020119454A1 (en) Method and apparatus for color reproduction of image
WO2018214838A1 (en) Surveillance image capture method, apparatus, and system
CN112788329A (en) Video static frame detection method and device, television and storage medium
CN107545556B (en) Signal lamp image processing method and system
CN110049347A (en) In method, system, terminal and the device of live streaming interface configurations image
US20170310872A1 (en) Image dynamic range adjustment method, terminal, and storage medium
CN111160340B (en) Moving object detection method and device, storage medium and terminal equipment
CN110930340B (en) Image processing method and device
CN105704363B (en) Image data processing method and device
CN112437237A (en) Shooting method and device
CN111641806A (en) Method, apparatus, computer apparatus and readable storage medium for halo suppression
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
EP3826294A1 (en) Systems and methods for image processing

Legal Events

Date Code Title Description
C06 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