CN102306380A - Histogram debugging method of colored image and debugging system thereof - Google Patents

Histogram debugging method of colored image and debugging system thereof Download PDF

Info

Publication number
CN102306380A
CN102306380A CN201110271810A CN201110271810A CN102306380A CN 102306380 A CN102306380 A CN 102306380A CN 201110271810 A CN201110271810 A CN 201110271810A CN 201110271810 A CN201110271810 A CN 201110271810A CN 102306380 A CN102306380 A CN 102306380A
Authority
CN
China
Prior art keywords
subregion
histogram
gray
threshold value
nodes
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.)
Granted
Application number
CN201110271810A
Other languages
Chinese (zh)
Other versions
CN102306380B (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.)
Oceanographic Instrumentation Research Institute Shandong Academy of Sciences
Original Assignee
Oceanographic Instrumentation Research Institute Shandong Academy of Sciences
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 Oceanographic Instrumentation Research Institute Shandong Academy of Sciences filed Critical Oceanographic Instrumentation Research Institute Shandong Academy of Sciences
Priority to CN 201110271810 priority Critical patent/CN102306380B/en
Publication of CN102306380A publication Critical patent/CN102306380A/en
Application granted granted Critical
Publication of CN102306380B publication Critical patent/CN102306380B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a histogram debugging method of a colored image and a debugging system thereof. According to the method, subarea nodes and subarea thresholds of a histogram of a colored image are arranged; according to an obtained node group with the thresholds, weighted translation calculation is carried out on each gray scale to obtain offset gray scales; and then each the gray scale of the colored image is replaced into each the offset gray scale. In addition, the system comprises a subarea node module, a subarea threshold module, a histogram subarea module, a threshold setting module, a gray scale transformation module and an image correction module. According to the invention, the following advantages are provided: novel functions, simple realization, low cost, and obvious debugging effect and the like. Moreover, according to the invention, a histogram is utilized to realize debugging on RGB image gray scale by a user. Therefore, a limitation on a gray scale debugging function of preset software can be broken through and furthermore, the user can set a random interval of a histogram of an image and a random threshold in the interval according to own needs of the user, thereby embodying strong interactivity, flexibility and generality. Therefore, the invention has a wide application prospect.

Description

The histogram adjustment method and the debug system thereof of coloured image
Technical field
The present invention relates to a kind of coloured image adjustment method and system, be specifically related to a kind of histogram adjustment method and debug system thereof of coloured image, belong to the digital image processing techniques field.
Technical background
Current many coloured images are because the influence of being taken various factorss such as light, shooting environmental tends to occur the uneven situation of various Luminance Distribution.Concerning the observer of picture, the uneven image of light and shade not only is difficult to read, and also is difficult to captured object is described really.Particularly, make the observer produce misjudgement easily, cause unnecessary loss through reading the application that image is judged.Therefore need debug the gray scale of coloured image,, further promote the quality of coloured image with balanced coloured image gray scale.
At present also there are some image processing softwares can realize certain histogram debug function, stretch and equalization such as histogram.But these adjustment methods are encapsulated in the development language bag mostly, lack man-machine interaction.And, obviously be difficult to obtain gratifying result with all kinds of images of a kind of fixing mode treatment because the Luminance Distribution situation of different images is different.
In addition, existing histogram stretches and the equalization algorithm can be lost a large amount of half-tone informations, the dullness that picture is become.Current many users also can adopt the mode of regulating brightness to remove to handle the uneven image of Luminance Distribution, but this method does not promote image quality not from changing the histogram distribution of image in essence.
In a word, existing histogram optimisation technique can not meet the demands, and is difficult to handle if concerning the user, run into this type of image, can cause a lot of inconvenience.
Summary of the invention
The histogram adjustment method and the debug system thereof that the purpose of this invention is to provide a kind of coloured image; To overcome the deficiency of prior art; To realize that the image to different intensity profile carries out the debugging of effective man-machine interaction; Realize the histogram adjustment and balanced coloured image gray scale of more optimization, further promote the quality of coloured image.
The present invention makes full use of the RGB color model of using in multi-purpose computer and the iconic model; Realize coloured image is debugged through this gradation of image information representation of the histogram mode that obtains that converts via the RGB color model; Only need to set the gray areas and the threshold value of image adjustment through man-machine interaction mode; Just can use the present invention that coloured image is handled, obtain result to different Luminance Distribution images.
A kind of histogram adjustment method of coloured image at first obtains the histogram of this coloured image, it is characterized in that this method may further comprise the steps:
(1) histogram subregion node is set, promptly set arbitrarily 0 to 255 with interior gray scale as the subregion node, does not perhaps set node and whole histogram is used as a subregion debugs, and the groups of nodes that obtains respective numbers is a subregion;
(2) histogram subregion threshold value is set, promptly each subregion in the step (1) is set an interior gray scale of this subregion as threshold value;
(3) greyscale transformation is promptly calculated the skew gray-scale value to each groups of nodes and corresponding threshold thereof, comprises following content:
Begin from the lower limit of each groups of nodes, read the GTG in the groups of nodes defined range, and judge the relation of GTG and threshold value: if current GTG is less than threshold value, then according to left side GTG function calculation skew gray-scale value; If current GTG is greater than threshold value, then according to right side GTG function calculation skew gray-scale value; If current GTG equals threshold value, then threshold value is left the skew gray-scale value, under the computing formula:
Left grayscale function:
Figure BDA0000091190680000021
Right grayscale function:
Figure BDA0000091190680000022
Formula 1
Wherein:
Left side grey exponent number=threshold value-nodal value lower limit
The right side ash exponent number=nodal value upper limit-threshold value+1; Formula 2
Figure BDA0000091190680000023
If 1/2 total grey exponent number is not an integer, then round numbers part, fractions omitted part; If the result that above-mentioned skew gray-scale value computing formula obtains is not integer, then round numbers part, fractions omitted part;
(4) coloured image is revised, each gray-scale value that is about to original colorful image replaces with the skew gray-scale value that calculates according to step (3);
(5) generate the result.
In the above-mentioned steps (1), can be according to the histogrammic situation of successively decreasing that increases progressively, histogrammic each local peak or local minimum point are set to node, promptly through the subregion node is set, and make the GTG in the groups of nodes of gained be monotone increasing or successively decrease.
When above-mentioned steps (2) was provided with the subregion threshold value to each subregion, the difference that makes the pixel quantity of threshold value both sides in the subregion was in 5000 point ranges.Since the resolution of screen often hundreds of thousands in addition up to a million more than, the difference of the pixel quantity of threshold value both sides is equal basically with the pixel number of these threshold value both sides of interior sufficient to guarantee at 5000 point ranges.
A kind of histogram debug system of coloured image is characterized in that this system comprises to be respectively applied for subregion node module and the subregion threshold module that subregion node and groups of nodes threshold value are set; Histogram is carried out the histogram division module of subregion according to the subregion joint; The threshold setting module of the joining property of judgment threshold and histogram subregion; Histogram is carried out the greyscale transformation module of greyscale transformation; Original gray scale is replaced with conversion image gray correcting module afterwards;
Above-mentioned greyscale transformation module comprises following content: accept subregion groups of nodes and threshold information from the threshold setting module; Be offset gray-scale value calculating according to subregion groups of nodes and threshold information, computation process adopts the mode of formula 1,2 to carry out, and result of calculation is saved as skew gray scale array, and export to image modification module.
Above-mentioned histogram division module comprises following content: according to the subregion node of user input the histogram of coloured image is carried out subregion, the subregion result is exported to the threshold setting module in order.
Above-mentioned threshold setting module comprises following content: accept the subregion result from the histogram division module; According to the threshold information judgment threshold of user's setting and the matching of subregion groups of nodes; Deposit classification results in array, and export to the greyscale transformation module.
Above-mentioned image modification module comprises following content: initialization target image and storage pixel address information; Acceptance is from the skew gray scale array of greyscale transformation module; According to skew gray scale array revise goal image and the preservation accepted.
At last, generating the result gets final product.
Adopt said system to realize the method that coloured image is debugged, may further comprise the steps through the histogram of regulating coloured image:
At first with pending coloured image input computing machine; The system that image modification module, histogram division module, threshold setting module, greyscale transformation module are formed is installed in the computing machine;
The histogram division module is accepted the subregion nodal information that the user is provided with, and the subregion node is divided into groups, and the subregion groups of nodes is transferred to the threshold setting module with the array form; The threshold setting module receives the threshold value that the user is provided with; Reception is from the node array of histogram division module; And to the matching of judging both according to threshold value and groups of nodes information (so-called matching be meant threshold value must in groups of nodes interval); With array stores matching result, the array that will comprise matched node group and threshold information is transferred to the greyscale transformation module; The greyscale transformation module receives the match information from the threshold setting module, calculates the skew gray-scale value, presses skew gray scale array correction original image gray-scale value through image modification module; The result of output entire image, debug process finishes.
The present invention has the function novelty, realizes advantages such as simple, with low cost, debugging effect is obvious.Realized the debugging of user through utilizing histogram to the RGB gradation of image; Not only overcome the limitation of existing software on the gray scale debug function; And the user also can set arbitrary threshold in any interval of image histogram and this interval according to self-demand, embodied very strong interactivity, dirigibility and versatility.The computing formula 1 and 2 of step of the present invention (3) has adopted the method for weighting translation; The weighting shift method has fully been safeguarded the gray scale structure of histogram itself; No matter what kind of subregion and threshold value are set; Can realize the weighted transformation of threshold value both sides gray scale; This method is more stable than the method for traditional linear translation; The gradation of image distribution is undergone mutation, thereby guaranteed the steady conversion of entire image.What be worth explanation is; Because the present invention allows in 0 to 255, at random to set subregion; And any gray scale all can be set to threshold value in the subregion; Therefore not only can realize this basic effect of gray balanceization of coloured image; But more as a kind of method in common or instrument, pass through the characteristics that subregion and threshold value arbitrariness thereof are set; Coloured image is carried out any conversion and debugging via histogram, be with a wide range of applications undoubtedly.
Description of drawings
Fig. 1 is a general structure synoptic diagram of the present invention.
Wherein, subregion node module 101, subregion threshold module 102, histogram division module 103, histogram thresholding setting module 104, greyscale transformation module 105, image modification module 106, debug results 107.
Fig. 2 is image modification module 106 schematic flow sheets of the present invention.
Comprising initialization 202, receive that skew gray scale group 209, instruction legitimacy judge 204, the command value legitimacy judges 205, according to skew gray scale correction image 206, use and finish to judge 208 and preserve new images 208.
Fig. 3 is histogram division module 103 schematic flow sheets of the present invention.
Subregion node 309, instruction legitimacy judge 302 comprising receiving, the command value legitimacy judges 304, subregion node grouping subprocess 305, the subregion groups of nodes are exported 306 and use and finish to judge 309 in order.
Fig. 4 is histogram thresholding setting module 104 schematic flow sheets of the present invention.
Subregion groups of nodes 410, instruction legitimacy judge 402, the command value legitimacy judges 404 comprising receiving, receive user's threshold information 405, the threshold value matching is judged and classification and storage subprocess 406 and use and finish to judge 408.
Fig. 5 is greyscale transformation module 105 schematic flow sheets of the present invention.
Subregion groups of nodes and threshold information 509, instruction legitimacy judge 502 comprising receiving, the command value legitimacy judges 504, the skew gray-scale value calculates subprocess 505, generate skew gray scale array 506 and use and finish judgement 507.
Fig. 6 is the subregion node grouping process synoptic diagram in the histogram division module 103 of the present invention.
Fig. 7 is that the threshold value matching in the histogram thresholding setting module 104 of the present invention is judged and the classification and storage synoptic diagram.
Fig. 8 is that the skew gray-scale value in the greyscale transformation module 105 of the present invention calculates synoptic diagram.
Fig. 9 be in the image modification module 106 of the present invention according to skew gray scale correction image synoptic diagram.
Figure 10 is the histogrammic synoptic diagram of certain coloured image after the present invention's debugging.
Embodiment
As shown in Figure 1, a kind of histogram adjustment method of coloured image at first obtains the histogram of this coloured image, and is further comprising the steps of:
(1) user is provided with histogram subregion node, promptly the user set arbitrarily 0 to 255 with interior gray scale as the subregion node, does not perhaps set node and whole histogram is used as a subregion debugs, and the groups of nodes that obtains respective numbers is a subregion;
(2) user is provided with histogram subregion threshold value, and promptly the user sets an interior gray scale of this subregion as threshold value to each subregion in the step (1);
(3) greyscale transformation is promptly calculated the skew gray-scale value to the array of each groups of nodes and corresponding threshold value thereof, comprises following content:
Begin from the lower limit of each groups of nodes, read the GTG in the groups of nodes defined range, and judge the relation of GTG and threshold value: if current GTG is less than threshold value, then according to left side GTG function calculation skew gray-scale value; If current GTG is greater than threshold value, then according to right side GTG function calculation skew gray-scale value; If current GTG equals threshold value, then threshold value is left the skew gray-scale value, computing formula is following:
Left grayscale function:
Figure BDA0000091190680000051
Right grayscale function:
Figure BDA0000091190680000052
Formula 1
Wherein:
Left side grey exponent number=threshold value-nodal value lower limit
The right side ash exponent number=nodal value upper limit-threshold value+1; Formula 2
Figure BDA0000091190680000053
If 1/2 total grey exponent number is not an integer, then round numbers part, fractions omitted part; If the result that above-mentioned skew gray-scale value computing formula obtains is not integer, then round numbers part, fractions omitted part;
(4) coloured image is revised, each gray-scale value that is about to original colorful image replaces with the skew gray-scale value that calculates according to step (3);
(5) generate the result.
As shown in figure 10; In the above-mentioned steps (1); The user can be according to the histogrammic situation of successively decreasing that increases progressively; Histogrammic each local peak or local minimum point are set to node; Be that the user is through being provided with the subregion node; And make the interior GTG of groups of nodes of gained be monotone increasing or successively decrease, and can more help making debug results level and smooth as far as possible like this, improve image quality; The user also can set node arbitrarily according to self needs, and every width of cloth histogram can be set a node arbitrarily, is divided into a subregion arbitrarily, but node must be more than or equal to zero and less than 255, because be 0 to 255 between gray area; The user also can not set node, so whole histogram is used as a subregion and is debugged; After the user has set the subregion node, carry out the threshold value setting of subregion groups of nodes again.
When above-mentioned steps (2) user was provided with the subregion threshold value to each subregion, the difference that makes the pixel quantity of threshold value both sides in the subregion was in 5000 point ranges.Since the resolution of screen often hundreds of thousands in addition up to a million more than, the difference of the pixel quantity of threshold value both sides is equal basically with the pixel number of these threshold value both sides of interior sufficient to guarantee at 5000 point ranges.The user also can be according to any setting threshold of self needs, but each subregion can only be provided with a threshold value, otherwise prompting makes mistakes.
As shown in Figure 1, a kind of histogram debug system of coloured image is characterized in that this system comprises to be respectively applied for the subregion node module 101 and subregion threshold module 102 that subregion node and groups of nodes threshold value are set; Histogram is carried out the histogram division module 103 of subregion according to the subregion joint; The threshold setting module 104 of the joining property of judgment threshold and histogram subregion; Histogram is carried out the greyscale transformation module 105 of greyscale transformation; Original gray scale is replaced with conversion image gray correcting module 106 afterwards;
Above-mentioned greyscale transformation module 105 comprises following content: accept subregion groups of nodes and threshold information from threshold setting module 104; Be offset gray-scale value calculating according to subregion groups of nodes and threshold information, computation process adopts the mode of formula 1,2 to carry out, and result of calculation is saved as skew gray scale array, and export to image modification module 106.
Fig. 5 representes above-mentioned greyscale transformation module 105, comprises following content: accept subregion groups of nodes and the array 509 of corresponding threshold value thereof after the coupling that comprise from 104; The legitimacy 502 of decision instruction; The legitimacy of query statement value; Calculate skew gray-scale value 505 according to 509 dope vectors that received; Generate skew gray scale array 506; Judge to use whether finish 507.
Fig. 8 representes aforementioned calculation skew gray-scale value subprocess 505, comprises following content: read groups of nodes and corresponding threshold value 802 thereof; The computing function factor 803 comprises grey exponent number 804, the 1/2 total grey exponent numbers 805 in left side, and right side ash exponent number 806 calls in order to calculating the skew gray-scale value.Computing formula is suc as formula shown in 2:
Left side grey exponent number=threshold value-nodal value lower limit
The right side ash exponent number=nodal value upper limit-threshold value+1
Figure BDA0000091190680000061
Formula 2 function factor calculation formula
If 1/2 total grey exponent number is not an integer, then round numbers part, fractions omitted part; Begin from the nodal value lower limit, read the GTG 807 in the groups of nodes defined range; That judges GTG and threshold value concerns 808, and situation in three is arranged: current GTG is less than threshold value 809, and current GTG is greater than threshold value 810, and current GTG equals threshold value 811; If current GTG less than threshold value, then calculates the skew gray-scale value according to left side GTG function 812; If current GTG greater than threshold value, then calculates the skew gray-scale value according to right side GTG function 813; If current GTG equals threshold value, then threshold value is left the skew gray-scale value.Computing formula is shown in formula 1:
Left grayscale function:
Figure BDA0000091190680000062
Right grayscale function:
Formula 1 skew gray-scale value computing formula
If the result that above-mentioned skew gray-scale value computing formula obtains is not integer, then round numbers part, fractions omitted part; After current GTG skew gray scale is calculated and finished, judge whether GTG arrives position, end 815, judges promptly whether gray scale reaches the nodal value upper limit, if reach then calculate end, if do not reach then grey exponent number adds 1 816, circulate 807 to 815 process of continuation.
Fig. 3 representes above-mentioned histogram division module 103, comprises following content: accept the subregion node 309 from 101; The legitimacy 302 of decision instruction; The legitimacy 304 of query statement value; The subregion node is divided into groups 305; The subregion groups of nodes is exported to 104 306 in order; Judge to use whether finish 307.
Fig. 6 represent above-mentioned with the border pair principle to the subregion node subprocess 305 that divides into groups, comprise following content: receive the subregion node, with in 0 and 255 two gray scale adding subregion node 602; Sort 603 to comprising 0 and 255 node; Deposit the ranking results order in array 604; Read current address and next address information 605 from the ranking results array, and store 606, judge whether second bit address is position, end 607, if the position, end then divides into groups to finish, then the address variable increases by 1608 if not the position, end, continues operation 605 to 607 processes.
Fig. 4 representes above-mentioned histogram thresholding setting module 104, comprises following content: accept the subregion node array 410 from 103; The legitimacy 402 of decision instruction; The legitimacy 404 of query statement value; Reception is from 102 threshold information 405; The decision threshold matching also classifies 406; Classification results is sent to greyscale transformation module 105 with the array form; Judge to use whether finish 408.
Fig. 7 representes above-mentioned decision threshold matching and classification and storage subprocess 406, comprises following content: the array 702 that reads groups of nodes by the address from the first place successively; Circulation read threshold information 706; To groups of nodes data and threshold value; Recycling and logic determines; Threshold value that and if only and if groups of nodes satisfy following relation: < the groups of nodes upper limit then deposits the corresponding threshold value of groups of nodes in new array 704, then reports an error and points out and revise input value 707 as not satisfying for groups of nodes lower limit≤threshold value and threshold value; Whether the group address of decision node group arrives last one 705, if end position then edge determination finish, then group address increases by 1708 if not the position, end, continues the process of circulation 702 to 705.
Fig. 2 representes above-mentioned image modification module 106, comprises following content: initialization is also duplicated by original image and to be generated target image 202; Acceptance is from 105 skew gray scale array 209; Judge the legitimacy 204 of access instruction; The legitimacy 205 of query statement value; According to skew gray scale correction image process 206; Judge to use whether finish 207; Preserve new images 208.
Fig. 9 representes above-mentioned according to skew gray scale correction image subprocess 206, comprises following content: accept skew gray scale array 902; Read current target image 903; In the groups of nodes interval, get gray-scale value 904; The pixel 905 of this gray scale of search in original image; Write down the address 907 of this pixel; In skew gray scale array, get the skew gray scale 906 of respective pixel; The gray scale of revise goal image 909 respective pixel is skew gray scale 908; Judge whether this gray scale reaches interval border 910.
After revising the end of from 0 to 255 GTG through image modification module 106, the GTG of the new images after then expression is debugged, i.e. debugging generates result 107.
Adopt said system to carry out the method that the coloured image debugging is handled, may further comprise the steps through regulating the coloured image histogram:
A, at first with pending coloured image input computing machine; The system that image modification module 106, histogram division module 103, threshold setting module 104, greyscale transformation module 105 are formed is installed in the computing machine;
B, user interactions mode: the user is provided with subregion node 101, and sends the subregion nodal information to histogram division module 103; The user is provided with subregion threshold value 102, and sends the subregion threshold information to histogram thresholding setting module 104.
C, the subregion node is carried out matched packet 305, comprise following content: receive the subregion node, in 0 and 255 two gray scale adding subregion node 602; Sort 603 to comprising 0 and 255 node; Deposit the ranking results order in array 604; Read current address and next address information 605 from the ranking results array, and store 606, judge whether second bit address is position, end 607, if the position, end then divides into groups to finish, then the address variable increases by 1 608 if not the position, end, continues operation 605 to 607 processes.
D, decision threshold matching also classify 406, comprise following content: the array 702 that reads groups of nodes by the address from the first place successively; Circulation read threshold information 706; To groups of nodes data and recycling and logic determines; Threshold value that and if only and if groups of nodes satisfy following relation: groups of nodes lower limit≤threshold value and threshold value < the groups of nodes upper limit; Then deposit the corresponding threshold value of groups of nodes in new array 704, then report an error and point out and revise input value 707 as not satisfying; Whether the group address of decision node group arrives last one 705, if the then edge determination end of position, end, then group address increases by 1 708 if not the position, end, continues the process of circulation 702 to 705.
E, calculating skew gray-scale value 505 comprise following content: read groups of nodes and corresponding threshold value 802 thereof; According to the formula 1 computing function factor 803; Begin from the nodal value lower limit, read the GTG 807 in the groups of nodes defined range; That judges GTG and threshold value concerns 808, and situation in three is arranged: current GTG is less than threshold value 809, then according to the left side GTG function calculation of formula 2; Current GTG is greater than threshold value 810, then according to the right side GTG function calculation of formula 2; Current GTG equals threshold value 811, then threshold value is kept; After current GTG skew gray scale is calculated and finished, judge whether GTG arrives position, end 815, if reach then calculate end, if do not reach then grey exponent number adds 1 816, circulate 807 to 815 process of continuation.
F, according to the skew gray-scale value correction original color image that above-mentioned greyscale transformation module 105 calculates, generate result 107 at last.
Embodiment 1
As shown in figure 10, Figure 10 a is the histogram of certain coloured image, and its situation of change from 0~255 is to change little (keeping sustained height basically) earlier, suddenly rises then until peak, descends then.The user can only establish a subregion node, shown in Figure 10 b, peak can be made as the subregion node and obtain two subregions, thereby previous subregion is monotone increasing trend, and a back subregion is monotone decreasing trend.
The user is provided with two subregions threshold value separately then, and for the pixel number that makes the threshold value both sides is equal basically, shown in Figure 10 b, the threshold value of previous subregion is near subregion node (being mxm.), and then the threshold value of a subregion is the centre position at this subregion basically.
After utilizing the present invention to debug, the histogram of this coloured image is shown in Figure 10 c.Because the present invention is the algorithm that adopts the weighting translation; Can make some gray scale integral body be adjusted into other gray scales after the debugging; The situation that the gray scale vacancy therefore can occur; This is because for the same area; The histogram thresholding both sides necessarily have a side to have the stretching phenomenon; Be that original number of greyscale levels is wanted during weighting moves between a wideer gray area; Therefore necessarily having some gray scales is in the vacancy state after conversion; But this variation can not exert an influence for the improvement of entire image effect, shows as gray balanceization generally.
Embodiment 2
Below in conjunction with accompanying drawing, be embodiment with the debugging of a width of cloth RGB image histogram, the present invention is realized that through regulating the coloured image histogram embodiment of Digital Image Processing does further detailed description:
Import a width of cloth RGB image, the user node a and b (0 < a <b < 255=, and subregion threshold value 102 is set threshold value m, n, k (0 < m < a < n <b < k < 255=are set through subregion node 101 is set.Like Fig. 1, the subregion node of setting sends to histogram division module 103, and the subregion threshold value of setting sends to histogram thresholding setting module 104.
Like Fig. 3, subregion node input 309, instruct judge 302 with inquiry legitimacy 304, do not report an error and the error message process 303 of resetting then be provided if conform to rule, if legal then get into the subregion node is carried out packet link 305.As shown in Figure 6,0 and 255 two gray scale is added subregion node 602, form a, b, 0,255 groups of nodes; It is sorted 603, form 0, a, b, 255 groups of nodes; Deposit its ranking results in array 604; Read array first address 0 and the second address a 605, and save as [0, a] 606 in proper order by two one group; Judge that a is not position, array end 607, so group address+1 608 continued circulation, read array second address a and the three-address b 605, and save as [a, b] 606 in proper order by two one group; Judge that b is not that therefore position, array end 607 is circulated and 605,606 stored according to [b, 255].As judge 255 for position, array end, then finish this process and get into next process 609; The subregion groups of nodes is exported to 104306 in order.
Like Fig. 4; Acceptance is from 103 subregion groups of nodes 410; Instruct judge 402 with inquiry legitimacy 404; If not conforming to rule reports an error and the error message process 403 of resetting then is provided; If legal then get into the decision threshold matching and classify 406, accept user's threshold information 405 simultaneously from 102; Like Fig. 7, read groups of nodes [0, a] 702,102 threshold values [m, n, k] that are provided with are read in circulation, satisfy [0 < m and m < a], then save as [[0, a], m] 704, and wherein last number his-and-hers watches show the subregion groups of nodes, and a back value representation is to threshold value that should groups of nodes; Judge whether [0, a] address is position, end 705, so because of not being the process 702 to 705 of end position address+1 708 cyclings [a, b] and [b, 255]; Through above process, produce three group node groups and corresponding threshold information and be respectively [[0, a], m], [[a, b], n], [[b, 255], k], order sends to greyscale transformation module 105.
Like Fig. 5, accept groups of nodes and corresponding threshold information 509 from 104, instruct judge 502 with inquiry legitimacy 504, do not report an error and the error message process 503 of resetting then be provided if conform to rule, if legal then get into the skew gray-scale value and calculate 505; Like Fig. 8, read groups of nodes and corresponding threshold thereof [[0, a], m] 802, calculate 804,805 and 806 in order to calling according to formula 1 respectively; Read groups of nodes [0 successively since 0; A] interior GTG, because of 0 < m 808, judge that thus current gray level is less than threshold value 809; Through type 2 left side GTG functions 812 calculate the skew gray-scale value and deposit array 814 in; Judge whether [0, a] address reaches position, end 815, do not reach the node region upper limit because of 0 < a; Current GTG+1 of circulating thus; Repeat 807 to 815 process, current gray level reaches the zone to be gone up in limited time, calculates for the skew gray scale of this node region and finishes and import array as a result into next process 817; Generation contain the array that is offset gray scale [[0, a], m, [0 ' ..., a ']] 506.
Like Fig. 2, initialization also generates target image 202 by original image; Acceptance from 105 skew gray scale group [[0, a], m, [0 ' ..., a ']] 209; Instruct the legitimacy of judgement 204 and value to inquire about 205; Like Fig. 9, read the target image 903 of generation, read skew gray scale array [[0, a], m, [0 ' ..., a ']] 902, from [0, a], get gray-scale value 0904, all gray-scale values of search are 0 pixel 905 and the memory address 907 that writes down this pixel in original image; Skew gray scale array [0 ' ..., a '] in get corresponding 0 skew gray scale 0 ' 906; Gray scale according to the relative address point that this address in the target image 909 is corresponding is transformed to 0 ' 908 by 0, judges whether 0 reach a, because of 0 < a; Institute is so that GTG 0 increases by 1, the process of circulation 904 to 910; Judge whether the corresponding skew of each node region gray scale group of target image is all accepted 207, then continues 209 as not accepting, and as all accepting, then the current goal image is saved as new images 208.
The new images that obtains is the result 107 of this debugging.

Claims (9)

1. the histogram adjustment method of a coloured image comprises the histogrammic step that generates this coloured image, it is characterized in that this method is further comprising the steps of:
(1) histogram subregion node is set, promptly set arbitrarily 0 to 255 with interior gray scale as the subregion node, does not perhaps set node and whole histogram is used as a subregion debugs, and the groups of nodes that obtains respective numbers is a subregion;
(2) histogram subregion threshold value is set, promptly each subregion in the step (1) is set an interior gray scale of this subregion as threshold value;
(3) greyscale transformation is promptly calculated the skew gray-scale value to each groups of nodes and corresponding threshold thereof, comprises following content:
Begin from the lower limit of each groups of nodes, read the GTG in the groups of nodes defined range, and judge the relation of GTG and threshold value: if current GTG is less than threshold value, then according to left side GTG function calculation skew gray-scale value; If current GTG is greater than threshold value, then according to right side GTG function calculation skew gray-scale value; If current GTG equals threshold value, then threshold value is left the skew gray-scale value, under the computing formula:
Left grayscale function:
Figure FDA0000091190670000011
Right grayscale function:
Figure FDA0000091190670000012
Formula 1 skew gray-scale value computing formula
Wherein:
Left side grey exponent number=threshold value-nodal value lower limit
The right side ash exponent number=nodal value upper limit-threshold value+1;
Figure FDA0000091190670000013
Formula 2 function factor calculation formula
If 1/2 total grey exponent number is not an integer, then round numbers part, fractions omitted part; If the result that above-mentioned skew gray-scale value computing formula obtains is not integer, then round numbers part, fractions omitted part;
(4) coloured image is revised, each gray-scale value that is about to original colorful image replaces with the skew gray-scale value that calculates according to step (3);
(5) generate debug results at last.
2. adjustment method as claimed in claim 1 is characterized in that in the above-mentioned steps (1) histogram subregion node being set, and makes the interior GTG of groups of nodes of gained be monotone increasing or successively decrease.
3. adjustment method as claimed in claim 1; When it is characterized in that above-mentioned steps (2) is provided with the subregion threshold value to each histogram subregion; The difference that makes the pixel quantity of threshold value both sides in the subregion and makes the pixel number of threshold value both sides equal basically in 5000 point ranges.
4. adjustment method as claimed in claim 1 is characterized in that before above-mentioned steps (3) greyscale transformation, the matching of the set threshold value of step 2 being judged, promptly reads each groups of nodes successively from the first place of groups of nodes, and the threshold information of read step (2); Threshold value that and if only and if groups of nodes satisfy following relation: < the groups of nodes upper limit then deposits the corresponding threshold value of groups of nodes in new array, then reports an error and points out the correction input value as not satisfying for groups of nodes lower limit≤threshold value and threshold value; Whether the group address of decision node group arrives last one, if the then edge determination end of position, end, then group address increases by 1 if not the position, end.
5. adjustment method as claimed in claim 1 is characterized in that the step of coloured image being revised in above-mentioned steps (4) is following: the skew gray scale of accepting step (3); Read the histogram of coloured image; In histogrammic each groups of nodes interval, get gray-scale value; Search has the pixel of this gray scale in the duplicating image of original image; In skew gray scale array, get the pairing skew gray scale of gray scale of this pixel; The gray scale of revising the duplicating image respective pixel is the skew gray scale; Judge whether this gray scale reaches interval border; After revising the end of from 0 to 255 GTG, the debugging of promptly carrying out step (5) generates the result.
6. the histogram debug system of a coloured image is characterized in that this system comprises to be respectively applied for the subregion node module (101) and subregion threshold module (102) that subregion node and groups of nodes threshold value are set; Histogram is carried out the histogram division module (103) of subregion according to the subregion joint; The threshold setting module (104) of the joining property of judgment threshold and histogram subregion; Histogram is carried out the greyscale transformation module (105) of greyscale transformation; Original gray scale is replaced with conversion image gray correcting module (106) afterwards;
Above-mentioned greyscale transformation module (105) comprises following content: accept subregion groups of nodes and threshold information from threshold setting module (104); Be offset gray-scale value calculating according to subregion groups of nodes and threshold information, computation process adopts the mode of formula 1,2 to carry out, and result of calculation is saved as skew gray scale array, and export to image modification module (106).
7. debug system as claimed in claim 6; It is characterized in that above-mentioned histogram division module (103) comprises following content: according to the subregion node of user input the histogram of coloured image is carried out subregion, the subregion result is exported to threshold setting module (104) in order.
8. debug system as claimed in claim 6 is characterized in that above-mentioned threshold setting module (104) comprises following content: accept the subregion result from histogram division module (103); According to the threshold information judgment threshold of user's setting and the matching of subregion groups of nodes; Deposit classification results in array, and export to greyscale transformation module (105).
9. debug system as claimed in claim 6 is characterized in that above-mentioned image modification module (106) comprises following content: initialization target image and storage pixel address information; Acceptance is from the skew gray scale array of greyscale transformation module (105); According to skew gray scale array revise goal image and the preservation accepted.
CN 201110271810 2011-09-14 2011-09-14 Histogram debugging method of colored image and debugging system thereof Expired - Fee Related CN102306380B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110271810 CN102306380B (en) 2011-09-14 2011-09-14 Histogram debugging method of colored image and debugging system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110271810 CN102306380B (en) 2011-09-14 2011-09-14 Histogram debugging method of colored image and debugging system thereof

Publications (2)

Publication Number Publication Date
CN102306380A true CN102306380A (en) 2012-01-04
CN102306380B CN102306380B (en) 2013-03-27

Family

ID=45380238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110271810 Expired - Fee Related CN102306380B (en) 2011-09-14 2011-09-14 Histogram debugging method of colored image and debugging system thereof

Country Status (1)

Country Link
CN (1) CN102306380B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109102471A (en) * 2018-07-20 2018-12-28 遵义师范学院 A kind of low power image display driving method based on histogram modification
CN110956587A (en) * 2018-09-27 2020-04-03 中科创达软件股份有限公司 Display picture adjusting method and device
CN113611244A (en) * 2021-08-04 2021-11-05 卡莱特云科技股份有限公司 LED display screen contrast improving method and LED display screen

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6504954B1 (en) * 1999-02-05 2003-01-07 Raytheon Company Closed loop piecewise-linear histogram specification method and apparatus
CN101286231A (en) * 2008-06-04 2008-10-15 四川虹微技术有限公司 Contrast enhancement method for uniformly distributing image brightness
CN101567080A (en) * 2009-05-19 2009-10-28 华中科技大学 Method for strengthening infrared focal plane array image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6504954B1 (en) * 1999-02-05 2003-01-07 Raytheon Company Closed loop piecewise-linear histogram specification method and apparatus
CN101286231A (en) * 2008-06-04 2008-10-15 四川虹微技术有限公司 Contrast enhancement method for uniformly distributing image brightness
CN101567080A (en) * 2009-05-19 2009-10-28 华中科技大学 Method for strengthening infrared focal plane array image

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KE JING, ET AL: "An Improved Algorithm for Shape Preserving Contrast Enhancement", 《ACTA PHOTONICA SINICA》 *
黄永,等: "卫星遥感图像的增强处理", 《广西气象》 *
黎育红,等: "基于自适应阈值的红外图像增强", 《科学技术与工程》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109102471A (en) * 2018-07-20 2018-12-28 遵义师范学院 A kind of low power image display driving method based on histogram modification
CN109102471B (en) * 2018-07-20 2021-11-23 遵义师范学院 Low-power-consumption image display driving method based on histogram correction
CN110956587A (en) * 2018-09-27 2020-04-03 中科创达软件股份有限公司 Display picture adjusting method and device
CN110956587B (en) * 2018-09-27 2023-07-21 中科创达软件股份有限公司 Display picture adjusting method and device
CN113611244A (en) * 2021-08-04 2021-11-05 卡莱特云科技股份有限公司 LED display screen contrast improving method and LED display screen

Also Published As

Publication number Publication date
CN102306380B (en) 2013-03-27

Similar Documents

Publication Publication Date Title
Zhou et al. Color difference classification based on optimization support vector machine of improved grey wolf algorithm
CN105740876B (en) A kind of image pre-processing method and device
CN103544506B (en) A kind of image classification method and device based on convolutional neural networks
CN111814626B (en) Dynamic gesture recognition method and system based on self-attention mechanism
CN108388925A (en) The anti-pattern collapse robust image generation method for generating network is fought based on New Conditions
CN104834912A (en) Weather identification method and apparatus based on image information detection
CN102903085A (en) Rapid image mosaic method based on corner matching
CN102306380B (en) Histogram debugging method of colored image and debugging system thereof
CN111209858A (en) Real-time license plate detection method based on deep convolutional neural network
CN105447842B (en) A kind of method and device of images match
Li et al. HM-YOLOv5: A fast and accurate network for defect detection of hot-pressed light guide plates
CN103530866B (en) A kind of image processing method based on Gaussian cloud transformation and device
CN110400307A (en) A kind of screen picture method for evaluating quality based on area differentiation
JP2023508641A (en) Data augmentation-based matter analysis model learning device and method
CN116935054A (en) Semi-supervised medical image segmentation method based on hybrid-decoupling training
CN103685972A (en) Image optimizing method and system employing same
CN107316276B (en) Method and device for stretching image
CN106094969A (en) The image aided diagnosis technique that a kind of maximum power point of photovoltaic power generation system is followed the trail of
CN113807407B (en) Target detection model training method, model performance detection method and device
KR102100933B1 (en) Method and apparatus for optimizing modular product using artificial neural network
KR102101770B1 (en) Method and apparatus for modularizing products
Fan et al. Recognition and analysis of fabric texture by double-sided fusion of transmission and reflection images under compound light source
CN107330905A (en) A kind of image processing method, device and storage medium
CN113870342A (en) Appearance defect detection method, intelligent terminal and storage device
Wu et al. Quick Response Code Binary Research Based on Basic Image Processing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Xu Yan

Inventor after: Ni Xiuhui

Inventor after: Wang Zhiping

Inventor after: Xia Weiping

Inventor after: Yang Guang

Inventor after: Yu Yanting

Inventor after: Xing Youguang

Inventor after: Wang Zhongqiu

Inventor after: Cui Hao

Inventor after: Li Ye

Inventor after: Liu Hui

Inventor after: Xiang Xu

Inventor after: Ma Qingfeng

Inventor before: Xu Yan

Inventor before: Cui Hao

Inventor before: Yang Guang

Inventor before: Li Ye

Inventor before: Yu Yanting

Inventor before: Wang Zhongqiu

Inventor before: Liu Hui

Inventor before: Xiang Xu

Inventor before: Ma Qingfeng

Inventor before: Ni Xiuhui

Inventor before: Xia Weiping

Inventor before: Xing Youguang

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: XU YAN YU YANTING WANG ZHONGQIU LIU HUI XIANG XU MA QINGFENG NI XIUHUI XIAWEIPING XING YOUGUANG CUI HAO YANG GUANG LI YE TO: XU YAN YU YANTING XING YOUGUANG WANG ZHONGQIU CUI HAO LI YE LIU HUI XIANG XU MA QINGFENG NI XIUHUI WANG ZHIPING XIA WEIPING YANG GUANG

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130327

Termination date: 20150914

EXPY Termination of patent right or utility model