CN111626967A - Image enhancement method, image enhancement device, computer device and readable storage medium - Google Patents

Image enhancement method, image enhancement device, computer device and readable storage medium Download PDF

Info

Publication number
CN111626967A
CN111626967A CN201910153570.7A CN201910153570A CN111626967A CN 111626967 A CN111626967 A CN 111626967A CN 201910153570 A CN201910153570 A CN 201910153570A CN 111626967 A CN111626967 A CN 111626967A
Authority
CN
China
Prior art keywords
image
pixel
value
pixel value
channel image
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.)
Pending
Application number
CN201910153570.7A
Other languages
Chinese (zh)
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.)
Shenzhen Fulian Fugui Precision Industry Co Ltd
Original Assignee
Fuhuake Precision Industry Shenzhen 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 Fuhuake Precision Industry Shenzhen Co ltd filed Critical Fuhuake Precision Industry Shenzhen Co ltd
Priority to CN201910153570.7A priority Critical patent/CN111626967A/en
Publication of CN111626967A publication Critical patent/CN111626967A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

An image enhancement method, comprising: acquiring an original image, and converting the original image into an HSV color space; acquiring a V-channel image from the converted image of the HSV color space, and averaging the V-channel image; carrying out histogram equalization on the V channel image subjected to the averaging removal; carrying out black and white binarization on the V channel image subjected to histogram equalization; and outputting the image subjected to black-white binarization to detect the target in the image. The invention also provides an image enhancement device, a computer device and a storage medium. According to the invention, the image is preprocessed to enhance the image edge information, so that the target main body is highlighted, and the subsequent target detection and tracking based on image vision are facilitated.

Description

Image enhancement method, image enhancement device, computer device and readable storage medium
Technical Field
The invention relates to the technical field of machine vision, in particular to an image enhancement method, an image enhancement device, a computer device and a computer readable storage medium for eliminating illumination influence based on image overall situation.
Background
In the field of image processing, a necessary and critical step of vision-based target detection and tracking is to extract information of a target, such as an outline, a position and the like of the target, from an image, but because a visible light camera which takes the image is influenced by illumination when imaging, the illumination is too strong and too weak, which causes missing or failure of target information extraction. Thus, eliminating the illumination effect is a very critical and essential issue for vision-based target detection and tracking.
Disclosure of Invention
In view of the foregoing, there is a need for an image enhancement method, apparatus, computer apparatus and computer readable storage medium capable of eliminating the influence of illumination on target detection and tracking in an image.
A first aspect of the present application provides an image enhancement method, the method comprising:
acquiring an original image, and converting the original image into an HSV color space;
acquiring a V-channel image from the converted image of the HSV color space, and averaging the V-channel image;
carrying out histogram equalization on the V channel image subjected to the averaging removal;
carrying out black and white binarization on the V channel image subjected to histogram equalization;
and outputting the image subjected to black-white binarization to detect the target in the image.
Preferably, the method of de-averaging the V-channel image includes:
calculating the pixel average value of all pixel points in the V-channel image;
comparing the pixel value of each pixel point with the pixel average value, and judging whether the pixel value of each pixel point is less than or equal to the pixel average value;
if the pixel value of the pixel point is less than or equal to the pixel average value, setting the pixel value of the pixel point to be zero; and
and if the pixel value of the pixel point is larger than the average pixel value, keeping the pixel value of the pixel point unchanged.
Preferably, the method for histogram equalization of the de-averaged V-channel image includes:
counting the occurrence times of each pixel value in the de-averaged V-channel image, and calculating a normalized probability statistic PiWherein P isiCalculated by the following formula:
Figure BDA0001982172480000021
wherein n isiRepresenting the number of times a pixel value i appears in the V-channel image, and N representing the sum of all the pixel numbers in the V-channel image;
calculating a cumulative distribution S of pixel values in the de-averaged V-channel imagekWherein the cumulative distribution SkCalculated by the following formula:
Figure BDA0001982172480000022
wherein the value range of k is [0,255 ];
resetting the pixel value of each pixel point according to the cumulative distribution of the pixel values, wherein adjusting the pixel values is performed according to the following formula:
Vnew=Si×gray_max
wherein, gray _ max is the maximum value of gray, i is the pixel value between 0 and the maximum value of gray _ max, Si represents the cumulative distribution corresponding to the pixel value, VnewIs the new pixel value after adjustment.
Preferably, the method for performing black and white binarization on the histogram equalized V-channel image includes:
judging whether the pixel value of each pixel point is greater than a preset threshold value or not;
if the pixel value is larger than the preset threshold value, setting the pixel value to be 255;
and if the pixel value is smaller than the preset value, setting the pixel value to be 0.
Preferably, the preset threshold is a pixel average value after averaging.
Preferably, the preset threshold is a pixel average value after histogram equalization.
A second aspect of the present application provides an image enhancement apparatus, the apparatus comprising: the image conversion module is used for acquiring an original image and converting the original image into an HSV color space;
the averaging removal module is used for obtaining a V-channel image from the converted image of the HSV color space and averaging the V-channel image;
the histogram equalization module is used for performing histogram equalization on the de-averaged V channel image;
the black-and-white binarization module is used for performing black-and-white binarization on the V channel image subjected to histogram equalization;
and the image output module is used for outputting the image subjected to black-white binarization to detect the target in the image.
A third aspect of the application provides a computer apparatus comprising a processor for implementing the image enhancement method when executing a computer program stored in a memory.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the image enhancement method.
The invention enhances the image edge information by preprocessing the image such as conversion, averaging removal, histogram equalization and the like, highlights the target main body, eliminates the influence of illumination on the image and is beneficial to the detection and tracking of the target information.
Drawings
Fig. 1 is a flowchart of an image enhancement method according to an embodiment of the present invention.
Fig. 2 is an original image provided by one embodiment of the present invention.
Fig. 3 is a V-channel image after converting the original image shown in fig. 2 into an HSV color space.
Fig. 4 is a V-channel image obtained by averaging the V-channel images in fig. 3.
Fig. 5 is a V-channel image obtained by histogram equalizing the V-channel image subjected to the averaging in fig. 4.
Fig. 6 is an image obtained by subjecting the histogram-equalized V-channel image of fig. 5 to black-and-white binarization.
Fig. 7 is a block diagram of an image enhancement apparatus according to an embodiment of the present invention.
FIG. 8 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are merely a subset of the embodiments of the present invention, rather than a complete embodiment. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Preferably, the image enhancement method of the present invention is applied in one or more computer devices. The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware thereof includes, but is not limited to, a processor, an external storage medium, a memory, and the like.
The computer device may be, but is not limited to, a desktop computer, a notebook computer, a cloud server, a smart phone, and the like. The computer device can be in man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel, gesture recognition equipment, voice control equipment and the like.
Example one
Fig. 1 is a flowchart of image enhancement according to an embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs. For convenience of explanation, only portions related to the embodiments of the present invention are shown.
As shown in fig. 1, the image enhancement method specifically includes the following steps:
and step S1, acquiring an original image to be processed, and converting the original image into an HSV color space.
The HSV color space is an intuitive color model and is widely applied to image editing. The HSV color space includes three components, Hue (Hue), Saturation (Saturation), and brightness (Value). The color calling angle measurement is in a value range of 0-360 degrees, the value is calculated from red in a counterclockwise direction, the red is 0 degree, the green is 120 degrees, the blue is 240 degrees, and the complementary colors are as follows: yellow is 60 °, cyan is 180 °, and magenta is 300 °. The saturation S indicates how close the color is to the spectral color, the higher the saturation, the darker and more brilliant the color. The brightness indicates the degree to which the color is bright.
In this embodiment, the color space of the original image may be, but is not limited to, RGB, YUV, and the like.
In one embodiment, when the color space of the original image is RGB, the original image is converted from RGB color space to HSV color space by: setting the corresponding RGB value of each pixel point in the original image of the RGB color space as (r, g, b), and the corresponding HSV value after conversion to the HSV color space as (h, s, v), and performing conversion from the RGB color space to the HSV color space by using the following formula:
wherein max is the maximum value of r, g and b, min is the minimum value of r, g and b:
Figure BDA0001982172480000051
Figure BDA0001982172480000052
v=max。
in another embodiment, when the color space of the original image is RGB, the original image may be further converted from RGB color space to HSV color space by a multiple regression equation or a neural network conversion model. Converting an original image from an RGB color space to an HSV color space by a multivariate multiple regression equation or a neural network conversion model is prior art and will not be described herein again.
In other embodiments, when the color space of the original image is YUV, the original image is first converted from YUV color space to RGB color space, and then from RGB color space to HSV color space, wherein the YUV color space is converted to RGB color space by the following method:
R=Y+1.402*(V-128);
G=Y–0.344*(U-128)–0.714*(V-128);
B=Y+1.772*(U-128);
after the RGB values are obtained, the RGB color space of the image is then converted into HSV color space by the RGB to HSV conversion method as described above.
For example, if fig. 2 shows an original image of RGB color space to be processed, the original image includes a black and white checkerboard O as a detection target. Converting the original image in fig. 2 from RGB color space to HSV color space, and as shown in fig. 3, converting the original image into a V-channel image.
And step S2, acquiring a V-channel image from the converted image of the HSV color space, and averaging the V-channel image.
Specifically, the method for de-averaging the V-channel image includes:
1) calculating the pixel average value in the V channel image;
calculating the pixel average value of the V-channel image is realized by the following method: acquiring pixel values of all pixel points of the V-channel image, adding all the pixel values, and dividing the sum by the total number of the pixels to obtain an average value image _ mean of all the pixels in the V-channel image;
2) comparing the pixel value v of each pixel point with the pixel average value image _ mean, and judging whether the pixel value v of each pixel point is less than or equal to the pixel average value image _ mean;
3) if the pixel value v of the pixel point is less than or equal to the pixel average value image _ mean, setting the pixel value v of the pixel point to be zero; and
4) if the pixel value v of the pixel point is larger than the pixel average value image _ mean, the pixel value of the pixel point is kept unchanged;
that is, the pixel value V1 of the pixel point in the V-channel image obtained by averaging the V-channel image may be represented as:
Figure BDA0001982172480000071
for example, continuing with the description of the image as described above, in this example, the detection target in the original image is a checkerboard with black and white grids, which is composed of two extreme colors, white portions in the checkerboard become gray under dark illumination, and black portions in the checkerboard become white when light is bright, so that the image needs to be enhanced to highlight the target. By obtaining the V-channel image after the averaging in fig. 4 by the averaging in the V-channel image in fig. 3, the detection target can be highlighted by changing the black portion to pure black in both the light-up and dark conditions.
And step S3, performing histogram equalization on the de-averaged V-channel image.
Specifically, the method for performing histogram equalization on the de-averaged V-channel image includes:
1) statistics ofCalculating the occurrence frequency of each pixel value in the de-averaged V-channel image and the normalized probability statistics PiWherein P isiCalculated by the following formula:
Figure BDA0001982172480000072
wherein n isiRepresenting the number of times a pixel value i appears in the V-channel image, and N representing the sum of all the pixel numbers in the V-channel image;
2) calculating a cumulative distribution S of pixel values in the de-averaged V-channel imagekWherein the cumulative distribution SkCalculated by the following formula:
Figure BDA0001982172480000073
wherein the value range of k is [0,255 ];
3) resetting the pixel value of each pixel point according to the cumulative distribution of the pixel values, wherein adjusting the pixel values is performed according to the following formula:
Vnew=Si×gray_max
wherein, gray _ max is the maximum value of gray, i is the pixel value between 0 and the maximum value of gray _ max, Si represents the cumulative distribution corresponding to the pixel value, VnewIs the new pixel value after adjustment.
In this embodiment, the maximum value of the gradation is 255. In other embodiments, the maximum gray level value may be set to other values within the interval of 0 to 255 as needed.
For example, continuing with the image illustration as described above, after the V-channel image is de-averaged, the black portion of the V-channel image in fig. 4 becomes pure black, and the white portion is still the original color. The histogram equalized image shown in fig. 5 is obtained after the histogram equalization, and the global contrast of the image is increased, especially when the contrast of useful data in the image is quite close. In this way, the luminance can be better distributed over the histogram.
And step S4, performing black and white binarization on the V channel image subjected to histogram equalization.
Specifically, the method for performing black-and-white binarization on the histogram equalized V-channel image includes:
judging whether the pixel value of each pixel point is greater than a preset threshold value or not;
if the pixel value is larger than the preset threshold value, setting the pixel value to be 255;
and if the pixel value is smaller than the preset value, setting the pixel value to be 0.
In an embodiment of the present invention, the preset threshold is a pixel average value after averaging.
In another embodiment of the present invention, the preset threshold is a pixel average value after histogram equalization.
In other embodiments of the present invention, the preset threshold may be manually set according to a scene and pre-stored in a preset storage location.
For example, continuing with the description of the image, after performing black-and-white binarization on the V-channel image after histogram equalization shown in fig. 5, the image after black-and-white binarization shown in fig. 6 is obtained, interference is reduced in the image after black-and-white binarization, and a black-and-white checkerboard as a target to be detected is more prominent, thereby facilitating target detection.
And step S5, outputting the V-channel image subjected to black-white binarization, wherein the output V-channel image subjected to black-white binarization is used for target detection.
The image enhancement method provided by the invention enhances the image through preprocessing such as conversion, averaging removal, histogram equalization and the like, so that the target is more prominent, and the influence of illumination on target detection is eliminated.
Example two
Fig. 7 is a structural diagram of an image enhancement apparatus according to a second embodiment of the present invention, which only shows portions related to the second embodiment of the present invention for convenience of description, and is described in detail below.
Referring to fig. 7, the image enhancement apparatus 100 may be divided into a plurality of functional modules according to the functions performed by the apparatus, and the functional modules are used for performing the steps in the corresponding embodiment of fig. 1 to realize the function of enhancing the image. In an embodiment of the present invention, the functional modules of the image enhancement apparatus 100 may include an image conversion module 101, a de-averaging module 102, a histogram equalization module 103, a black-and-white binarization module 104, and an image output module 105. The functions of the respective functional blocks will be described in detail in the following embodiments.
The image conversion module 101 obtains an original image to be processed, and converts the original image into an HSV color space.
In this embodiment, the color space of the original image may be, but is not limited to, RGB, YUV, and the like.
In one embodiment, when the color space of the original image is RGB, the image conversion module 101 converts the original image from RGB color space to HSV color space by: setting the corresponding RGB value of each pixel point in the original image of the RGB color space as (r, g, b), and the corresponding HSV value after conversion to the HSV color space as (h, s, v), and performing conversion from the RGB color space to the HSV color space by using the following formula:
wherein max is the maximum value of r, g and b, min is the minimum value of r, g and b:
Figure BDA0001982172480000091
Figure BDA0001982172480000101
v=max。
in another embodiment, when the color space of the original image is RGB, the image conversion module 101 may further convert the original image from RGB color space to HSV color space by using a multiple regression equation or a neural network conversion model. Converting an original image from an RGB color space to an HSV color space by a multivariate multiple regression equation or a neural network conversion model is prior art and will not be described herein again.
In other embodiments, when the color space of the original image is YUV, the image conversion module 101 converts the original image from YUV color space to RGB color space, and then converts the original image from RGB color space to HSV color space, wherein the YUV color space is converted to RGB color space by the following method:
R=Y+1.402*(V-128);
G=Y–0.344*(U-128)–0.714*(V-128);
B=Y+1.772*(U-128);
after the image conversion module 101 obtains the RGB values, the RGB color space of the image is then converted into the HSV color space by the RGB to HSV conversion method.
The averaging module 102 is configured to obtain a V-channel image from the converted image in the HSV color space, and perform averaging on the V-channel image.
Specifically, the method for the de-averaging module 102 to de-average the V-channel image includes:
1) calculating the pixel average value in the V channel image;
calculating the pixel average value of the V-channel image is realized by the following method: acquiring pixel values of all pixel points of the V-channel image, adding all the pixel values, and dividing the sum by the total number of the pixels to obtain an average value image _ mean of all the pixels in the V-channel image;
2) comparing the pixel value v of each pixel point with the pixel average value image _ mean, and judging whether the pixel value v of each pixel point is less than or equal to the pixel average value image _ mean;
3) if the pixel value v of the pixel point is less than or equal to the pixel average value image _ mean, setting the pixel value v of the pixel point to be zero;
4) if the pixel value v of the pixel point is larger than the pixel average value image _ mean, the pixel value of the pixel point is kept unchanged;
that is, the pixel value V1 of the pixel point in the V-channel image obtained by averaging the V-channel image may be represented as:
Figure BDA0001982172480000111
the histogram equalization module 103 is configured to perform histogram equalization on the de-averaged V-channel image.
Specifically, the method for histogram equalization of the de-averaged V-channel image by the histogram equalization module 103 includes:
1) counting the occurrence times of each pixel value in the de-averaged V-channel image, and calculating a normalized probability statistic PiWherein P isiCalculated by the following formula:
Figure BDA0001982172480000112
wherein n isiRepresenting the number of times a pixel value i appears in the V-channel image, and N representing the sum of all the pixel numbers in the V-channel image;
2) calculating a cumulative distribution S of pixel values in the de-averaged V-channel imagekWherein the cumulative distribution SkCalculated by the following formula:
Figure BDA0001982172480000113
wherein the value range of k is [0,255 ];
3) resetting the pixel value of each pixel point according to the cumulative distribution of the pixel values, wherein adjusting the pixel values is performed according to the following formula:
Vnew=Si×gray_max;
wherein, gray _ max is the maximum value of gray, i is the pixel value between 0 and the maximum value of gray _ max, Si represents the cumulative distribution corresponding to the pixel value, VnewIs the new pixel value after adjustment.
In this embodiment, the maximum value of the gradation is 255. In other embodiments, the maximum gray level value may be set to other values within the interval of 0 to 255 as needed.
The black-and-white binarization module 104 is configured to perform black-and-white binarization on the V-channel image subjected to histogram equalization.
Specifically, the method for performing black-and-white binarization on the histogram equalized V-channel image by the black-and-white binarization module 104 includes:
judging whether the pixel value of each pixel point is greater than a preset threshold value or not;
if the pixel value is larger than the preset threshold value, setting the pixel value to be 255;
and if the pixel value is smaller than the preset value, setting the pixel value to be 0.
In an embodiment of the present invention, the preset threshold is a pixel average value after averaging.
In another embodiment of the present invention, the preset threshold is a pixel average value after histogram equalization.
In other embodiments of the present invention, the preset threshold may be manually set according to a scene and pre-stored in a preset storage location.
The image output module 105 is configured to output the black-and-white binarized V-channel image, and the output black-and-white binarized V-channel image is used for target detection.
EXAMPLE III
Fig. 8 is a schematic diagram of a computer device according to a third embodiment of the present invention. The computer device 1 comprises a memory 20, a processor 30 and a computer program 40, such as an image enhancement program, stored in the memory 20 and executable on the processor 30. The processor 30, when executing the computer program 40, implements the steps in the above-described embodiment of the image enhancement method, such as the steps S1-S5 shown in fig. 1. Alternatively, the processor 30, when executing the computer program 40, implements the functions of each module/unit in the above-mentioned device embodiments, such as the modules 101 to 105 in fig. 7.
Illustratively, the computer program 40 may be partitioned into one or more modules/units that are stored in the memory 20 and executed by the processor 30 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 40 in the computer apparatus 1. For example, the computer program 40 can be divided into an image conversion module 101, a de-averaging module 102, a histogram equalization module 103, a black-and-white binarization module 104 and an image output module 105 in fig. 7, and the specific functions of each module are described in embodiment two.
The computer device 1 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. It will be understood by those skilled in the art that the schematic diagram 8 is only an example of the computer apparatus 1, and does not constitute a limitation to the computer apparatus 1, and may include more or less components than those shown, or combine some components, or different components, for example, the computer apparatus 1 may further include an input and output device, a network access device, a bus, and the like.
The Processor 30 may be a Central Processing Unit (CPU), and may include other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 30 is the control center of the computer device 1 and connects the various parts of the whole computer device 1 by various interfaces and lines.
The memory 20 may be used for storing the computer program 40 and/or the module/unit, and the processor 30 implements various functions of the computer device 1 by running or executing the computer program and/or the module/unit stored in the memory 20 and calling data stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the computer apparatus 1, and the like. The storage 20 may include an external storage medium, and may also include a memory. In addition, the memory 20 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The modules/units integrated with the computer device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method of implementing the above embodiments may also be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the above embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In the embodiments provided in the present invention, it should be understood that the disclosed computer apparatus and method can be implemented in other ways. For example, the above-described embodiments of the computer apparatus are merely illustrative, and for example, the division of the units is only one logical function division, and there may be other divisions when the actual implementation is performed.
In addition, functional units in the embodiments of the present invention may be integrated into the same processing unit, or each unit may exist alone physically, or two or more units are integrated into the same unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. The units or computer means recited in the computer means claims may also be implemented by the same unit or computer means, either in software or in hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method of image enhancement, the method comprising:
acquiring an original image, and converting the original image into an HSV color space;
acquiring a V-channel image from the converted image of the HSV color space, and averaging the V-channel image;
carrying out histogram equalization on the V channel image subjected to the averaging removal;
carrying out black and white binarization on the V channel image subjected to histogram equalization;
and outputting the image subjected to black-white binarization to detect the target in the image.
2. The image enhancement method of claim 1, wherein the method of de-averaging the V-channel image comprises:
calculating the pixel average value of all pixel points in the V-channel image;
comparing the pixel value of each pixel point with the pixel average value, and judging whether the pixel value of each pixel point is less than or equal to the pixel average value;
if the pixel value of the pixel point is less than or equal to the pixel average value, setting the pixel value of the pixel point to be zero; and
and if the pixel value of the pixel point is larger than the average pixel value, keeping the pixel value of the pixel point unchanged.
3. The image enhancement method of claim 2, wherein the method of histogram equalizing the de-averaged V-channel image comprises:
counting the occurrence times of each pixel value in the de-averaged V-channel image, and calculating a normalized probability statistic PiWherein P isiCalculated by the following formula:
Figure FDA0001982172470000011
wherein n isiRepresenting the number of times a pixel value i appears in the V-channel image, and N representing the sum of all the pixel numbers in the V-channel image;
calculating a cumulative distribution S of pixel values in the de-averaged V-channel imagekWherein the cumulative distribution SkCalculated by the following formula:
Figure FDA0001982172470000021
wherein the value range of k is [0,255 ];
resetting the pixel value of each pixel point according to the cumulative distribution of the pixel values, wherein adjusting the pixel values is performed according to the following formula:
Vnew=Si×gray_max
wherein, gray _ max is the maximum value of gray, i is the pixel value between 0 and the maximum value of gray _ max, Si represents the cumulative distribution corresponding to the pixel value, VnewIs the new pixel value after adjustment.
4. The image enhancement method according to claim 3, wherein the method of performing black-and-white binarization on the histogram-equalized V-channel image comprises:
judging whether the pixel value of each pixel point is greater than a preset threshold value or not;
if the pixel value is larger than the preset threshold value, setting the pixel value to be 255;
and if the pixel value is smaller than the preset value, setting the pixel value to be 0.
5. The image enhancement method of claim 4, wherein the preset threshold is a pixel average value after the averaging.
6. The image enhancement method of claim 4, wherein the preset threshold is a histogram equalized pixel average value.
7. An image enhancement apparatus, characterized in that the image enhancement apparatus comprises:
the image conversion module is used for acquiring an original image and converting the original image into an HSV color space;
the averaging removal module is used for obtaining a V-channel image from the converted image of the HSV color space and averaging the V-channel image;
the histogram equalization module is used for performing histogram equalization on the de-averaged V channel image;
the black-and-white binarization module is used for performing black-and-white binarization on the V channel image subjected to histogram equalization;
and the image output module is used for outputting the image subjected to black-white binarization to detect the target in the image.
8. The image enhancement apparatus of claim 7, wherein the de-averaging module de-averages the V-channel image comprising:
calculating the pixel average value of all pixel points in the V-channel image;
comparing the pixel value of each pixel point with the pixel average value, and judging whether the pixel value of each pixel point is less than or equal to the pixel average value;
if the pixel value of the pixel point is less than or equal to the pixel average value, setting the pixel value of the pixel point to be zero; and
and if the pixel value of the pixel point is larger than the average pixel value, keeping the pixel value of the pixel point unchanged.
9. A computer arrangement, characterized in that the computer arrangement comprises a processor for implementing the image enhancement method as claimed in any one of claims 1-6 when executing a computer program stored in a memory.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the image enhancement method according to any one of claims 1 to 6.
CN201910153570.7A 2019-02-28 2019-02-28 Image enhancement method, image enhancement device, computer device and readable storage medium Pending CN111626967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910153570.7A CN111626967A (en) 2019-02-28 2019-02-28 Image enhancement method, image enhancement device, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910153570.7A CN111626967A (en) 2019-02-28 2019-02-28 Image enhancement method, image enhancement device, computer device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111626967A true CN111626967A (en) 2020-09-04

Family

ID=72260527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910153570.7A Pending CN111626967A (en) 2019-02-28 2019-02-28 Image enhancement method, image enhancement device, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111626967A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112481839A (en) * 2020-11-27 2021-03-12 杭州数迈科技有限公司 Fabric sewing method, system, equipment and storage medium
CN114494084A (en) * 2022-04-14 2022-05-13 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium
CN114972346A (en) * 2022-07-29 2022-08-30 山东通达盛石材有限公司 Stone identification method based on computer vision
CN116614272A (en) * 2023-05-23 2023-08-18 北京科技大学 Digital remote sharing platform for scanning electron microscope
CN116993636A (en) * 2023-07-10 2023-11-03 中国地质大学(武汉) Image enhancement method and device for underground low-illumination deep stratum empty area

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211459A (en) * 2007-12-21 2008-07-02 上海广电集成电路有限公司 Boundary point processed histogram balancing method
US20090214108A1 (en) * 2008-02-26 2009-08-27 Jonathan Yen System and method for isolating near achromatic pixels of a digital image
CN101980282A (en) * 2010-10-21 2011-02-23 电子科技大学 Infrared image dynamic detail enhancement method
US20110206280A1 (en) * 2007-05-03 2011-08-25 Ho-Young Lee Image brightness controlling apparatus and method thereof
US20140348427A1 (en) * 2012-10-19 2014-11-27 Google Inc. Automatic color correction
CN106485199A (en) * 2016-09-05 2017-03-08 华为技术有限公司 A kind of method and device of body color identification
CN106530237A (en) * 2016-09-19 2017-03-22 中山大学 Image enhancement method
CN108470329A (en) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 A kind of image processing method and system
CN109146826A (en) * 2018-06-27 2019-01-04 华南理工大学 A kind of image enchancing method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110206280A1 (en) * 2007-05-03 2011-08-25 Ho-Young Lee Image brightness controlling apparatus and method thereof
CN101211459A (en) * 2007-12-21 2008-07-02 上海广电集成电路有限公司 Boundary point processed histogram balancing method
US20090214108A1 (en) * 2008-02-26 2009-08-27 Jonathan Yen System and method for isolating near achromatic pixels of a digital image
CN101980282A (en) * 2010-10-21 2011-02-23 电子科技大学 Infrared image dynamic detail enhancement method
US20140348427A1 (en) * 2012-10-19 2014-11-27 Google Inc. Automatic color correction
CN106485199A (en) * 2016-09-05 2017-03-08 华为技术有限公司 A kind of method and device of body color identification
CN106530237A (en) * 2016-09-19 2017-03-22 中山大学 Image enhancement method
CN108470329A (en) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 A kind of image processing method and system
CN109146826A (en) * 2018-06-27 2019-01-04 华南理工大学 A kind of image enchancing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘瑞祯等: "《OpenCV教程基础篇》", 30 June 2007, pages: 276 *
刘瑞祯等编著: "嵌入式图像处理系统工程案例精选 DaVinci系统设计与实现", 西安:西安电子科技大学出版社, pages: 276 - 78 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112481839A (en) * 2020-11-27 2021-03-12 杭州数迈科技有限公司 Fabric sewing method, system, equipment and storage medium
CN114494084A (en) * 2022-04-14 2022-05-13 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium
CN114494084B (en) * 2022-04-14 2022-07-26 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium
CN114972346A (en) * 2022-07-29 2022-08-30 山东通达盛石材有限公司 Stone identification method based on computer vision
CN114972346B (en) * 2022-07-29 2022-11-04 山东通达盛石材有限公司 Stone identification method based on computer vision
CN116614272A (en) * 2023-05-23 2023-08-18 北京科技大学 Digital remote sharing platform for scanning electron microscope
CN116614272B (en) * 2023-05-23 2024-05-14 北京科技大学 Digital remote sharing platform for scanning electron microscope
CN116993636A (en) * 2023-07-10 2023-11-03 中国地质大学(武汉) Image enhancement method and device for underground low-illumination deep stratum empty area
CN116993636B (en) * 2023-07-10 2024-02-13 中国地质大学(武汉) Image enhancement method and device for underground low-illumination deep stratum empty area

Similar Documents

Publication Publication Date Title
CN111626967A (en) Image enhancement method, image enhancement device, computer device and readable storage medium
CN107403421B (en) Image defogging method, storage medium and terminal equipment
WO2017121018A1 (en) Method and apparatus for processing two-dimensional code image, and terminal and storage medium
CN107680056B (en) Image processing method and device
US11138695B2 (en) Method and device for video processing, electronic device, and storage medium
US10783837B2 (en) Driving method and driving device of display device, and related device
CN108876742B (en) Image color enhancement method and device
CN108230256A (en) Image processing method, device, computer installation and computer readable storage medium
EP3855387A1 (en) Image processing method and apparatus, electronic device, and readable storage medium
CN110969046B (en) Face recognition method, face recognition device and computer-readable storage medium
JP6779688B2 (en) Image processing equipment, image processing method, computer program
US9449375B2 (en) Image processing apparatus, image processing method, program, and recording medium
WO2022142219A1 (en) Image background processing method, apparatus, electronic device, and storage medium
CN108711160B (en) Target segmentation method based on HSI (high speed input/output) enhanced model
CN111311500A (en) Method and device for carrying out color restoration on image
CN107256539B (en) Image sharpening method based on local contrast
CN110599553B (en) Skin color extraction and detection method based on YCbCr
CN113870100A (en) Image processing method and electronic device
CN110298812B (en) Image fusion processing method and device
CN112381073A (en) IQ (in-phase/quadrature) adjustment method and adjustment module based on AI (Artificial Intelligence) face detection
CN105740820B (en) Method and system for acquiring picture for discrimination
CN111539975A (en) Method, device and equipment for detecting moving target and storage medium
CN111833256A (en) Image enhancement method, image enhancement device, computer device and readable storage medium
CN112070096B (en) Color recognition method, device, terminal equipment and storage medium
CN109242750B (en) Picture signature method, picture matching method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20221130

Address after: The first floor, the second floor, the third floor and the fourth floor of the factory building No.1, f8d District, Foxconn science and Technology Industrial Park, east side of Minqing Road, Longhua street, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Fulian Fugui Precision Industry Co.,Ltd.

Address before: 518109 3rd floor, building 1, F8B, Foxconn Science Park, No.2, Donghuan 2nd Road, Longhua street, Longhua District, Shenzhen City, Guangdong Province

Applicant before: FUHUAKE PRECISION INDUSTRY (SHENZHEN) Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200904