This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2011-256085 filed Nov. 24, 2011.
The present invention relates to distribution evaluation apparatus, distribution evaluation method, distribution determining apparatus, distribution determining method, image processing apparatus, image processing apparatus method, and computer readable medium.
According to an aspect of the invention, a distribution evaluation apparatus is provided. The distribution evaluation apparatus includes an evaluation value calculating unit that calculates weighted energy, as an evaluation value representing distribution of two located objects x and y, by calculating a product resulting from multiplying weighting function values ω(x) and ω(y) and probability density function values φ(x) and φ(y) representing densities or sizes of the located objects x and y, by a mutual influence value determined by a function fr having as a variable a distance between the located objects x and y, and then by summing the resulting products with respect to all the located objects x and y into the weighted energy, and an evaluating unit that evaluates the distribution of the located objects in accordance with the evaluation value calculated by the evaluation value calculating unit.
Exemplary embodiments of the present invention will be described in detail based on the following figures, wherein:
For understanding the present invention, it will be useful to describe the background and summary of the present invention first.
A technical demand commonly felt in the field of digital image processing techniques is to perform a predetermined process on a provided original image without adversely affecting an image quality of the image in vision.
One of such technical demands includes reducing an amount of data and a color count with an image maintained sufficiently close in vision to an original image in each of a lossless compression technique, a color decreasing technique, and a digital halftoning technique that is a special case of the color decreasing technique. In the evaluation of the performance of the image processing technique, one demand is to evaluate the degree of discrepancy between an original image and an “image resulting from processing.” These demands have been typically and separately addressed in fields of image processing, and no general and consistent concept has been established across the fields.
Japanese Unexamined Patent Application Publication No. 2007-189427 discloses a method of addressing such a demand in a dispersed-dot halftoning technique in the digital halftoning technique field. More specifically, in one disclosed method, a binary image restoring an original image is obtained by defining energy that results from multiplying an inverse number of a density determined from the original image (an inverse number of a pixel value of the original image), and by decreasing the energy of any binary image. In another method, a discrepancy between any binary image and an original image is evaluated according to energy.
The dispersed-dot halftoning technique in the digital halftoning technique field disclosed in Japanese Unexamined Patent Application Publication No. 2007-189427 addresses the commonly felt demands, including the demand that allows the predetermined process to be performed without adversely affecting the given original image in vision, and the demand that allows the discrepancy from the original image to be evaluated. However, in the other fields, these demands are not addressed. It is thus desirable to address the typical demand consistently and universally and to provide a plurality of useful features in the image processing technical field. More generally, it is desirable to acquire a distribution of located objects different in density and size, the distribution faithfully satisfying a given density distribution.
A distribution determining apparatus of one exemplary embodiment of the present invention is described below. Before discussing a distribution evaluation process and a distribution determination process of the distribution determining apparatus, the definition of weighted energy and energy decreasing as concepts underlying the processes are described first.
According to the exemplary embodiment, a concept of weighted energy serves as a measure of evaluation of distribution. A mutual influence value and a weighted potential are defined as below, followed by the discussion of the definition of weighted energy.
The distribution determining apparatus of the exemplary embodiment acts in a compact metric space X. Here, the following discussion is based on the premise that distance |x−y| between two points xεX and yεX is defined in the space X in uniformity. The word “uniformity” refers to the fact that all points within a distance r from any point x belongs to the space X. A two-dimensional rectangle X may now be considered. As for the surrounding of the rectangle, distance |x−y| is defined as a surrounding environment. More specifically, X represents a space where the left side is connected to the right side in the rectangle, and the upper side is connected to the lower side in the rectangle. The shortest distance from point x to point y is defined as |x−y|. (If an ordinary distance in the space X is used without defining the distance, no uniformity is established along the upper and lower sides, and the left and right sides). Let x represent a point of interest in the space X, and y another point, and a mutual influence value caused between x and y is defined by expression as follows:
fr(|x−y|)
The weighted potential is determined by calculating a product resulting from multiplying the mutual influence value between the point of interest xεX and each of the points y belonging to the space X by weighting functions ω(x) and ω(y), and by integrating the resulting product with respect to probability measure μ over the point y in the space X. The weighted potential is determined by the following expression:
Weighted energy I(μ) of the probability measure μ is determined by integrating the weighted potentials over all points x belonging to X with respect to probability measure μ as described in the following equation (1):
In other words, the weighted energy I(μ) is obtained by multiplying the mutual influence value between every two points x and y belonging to the space X by the weighting function value ω(x) and ω(y) of x and y, and by integrating the product with respect to measure μ over x and y.
The weighting function ω is desirably determined by a predetermined probability measure ν in the space X, or in narrow sense by a probability density function ψ. To clarify the weighting function ω, the weighting function ω may be written as ων if determined by ν or may be written as ωψ if determined by ψ. The weighting functions ων and ωψ are continuous functions defined in the space X just as the probability measure ν and the probability density function ψ are. The weighting functions ων and ωψ define a weight that is to be multiplied by an energy value at each point in the space X. The definition of the weighting functions is described in detail below.
The exemplary embodiment of the present invention is characterized by the feature that the weighted energy I(μ) of equation (1) takes a minimum value when μ=ν, where ν is a given probability measure. The definitions of the weighting function ω and the function fr defining the mutual influence value, included in equation (1) defining the weighted energy I(μ) are described below.
The function fr for calculating the mutual influence value is expressed by function h(x) defined along interval [0,1] as follows:
fr(x)=h(x/r) (x<r)
fr(x)=0 (x≧r)
where the following three conditions are to be satisfied:
H1:h is monotonically decreasing convex and belongs to the class C2
H3: (h″(x1/2)/(x1/2))1/2 is convex
Specific examples of h(x) satisfying conditions H1 through H3 may be the following functions:
h(x)=(⅔−x+⅓·x3)2 (2)
or h(x)=(1−x)5
An example of the function h(x) constituting the function fr is expressed by equation (2), and illustrated by a solid-line plot in
If the two points x and y are spaced from each other by a distance equal to or longer than the distance r, the mutual influence value is fr(|x″y|)=0. The summing operation of the weighted energy defined by equation (1) is performed on target points that are only all points yεX within a circle defined by radius r and centered at a point of interest xεX. A point (blank small circle) outside the circle of radius r may be neglected under condition fr(x)=0 (x≧r).
Definition of Weighting Function ω in Accordance with Probability Measure ν
The weighted energy I(μ) may be defined using any weighting function ω. The weighted energy I(μ) may be rendered more meaningful by defining ω by given probability measure ν or probability density function ψ. The weighting function is expressed as ων, and described below is how the weighting function ων is determined by the probability measure ν. In many cases in practice, it may be considered that the weighting function ω is determined in a limited sense by a probability density function ψ in a discrete space D. With this consideration, the weighting function ω may be intuitively understood (because ω is expressed by a simple sum in place of an integral). More description about this is provided below.
If a probability measure ν is given, ν itself is used. If a probability density function ψ(x) is given, ν is determined for any set A by the following:
The weighting function ω is defined as a solution ω of integral equation (3) below:
In other words, ω is defined as a weighting function in accordance with which the weighted potential is a constant (K) at each point x in response to a given probability measure ν.
K is any positive constant. Typically, K is ∫yεx fr(|y|)dy. The solution of integral equation (3) may be approximated using a successive iteration method. For example, approximation may be performed by mapping initial value η(x)=1 for all xεX by multiple times in accordance with mapping T (from function to function) defined by the following equation:
Typically, sufficient convergence results are ensured if initial value η is mapped in accordance with mapping T by several times. Alternatively, if a probability density function ψ(x) is given, a definition of the appropriate initial value η may be η(x)=ψ(x)−1/2. Since ω(x) is characteristic of function form similar to the function form of ψ(x)−1/2, the setting of the initial value to this function expedites convergence.
As described above, the weighted energy I(μ) of equation (1) is defined by determining the function fr by h(x) satisfying the conditions H1-H3, and by approximating ω defined by equation (3) by iterating mapping T. The probability measure ν given in the space X may be thus guaranteed as an energy minimum. In other words, the weighted energy I(μ) of any probability measure μ in the space X is minimized with μ=ν. How the probability measure μ is close to the probability measure ν may be quantitatively evaluated using weighted energy I(μ), and the probability measure μ may be approximated to the probability measure ν through energy decrease as described below (the concept of closeness between μ and ν is mathematically defined by the concept of the weak* topology in the space of all probability measures). If function fr not satisfying the conditions H1-H3 as denoted by broken line in
Definition of Weighting Function ω in Accordance with Probability Density Function ψ in Discrete Space D
The probability measure ν in the space X mathematically defined as described above may be considered without any problem as the probability density function ψ defined in the discrete space D in many cases in practice. In such a case, integral symbol ∫xεx is replaced with ΣxεD in the definition of energy. Weighted energy I(φ) of probability density function φ is thus defined by the following equation (4):
where ω is referred to as ωψ to clearly indicate that ω is determined by ψ.
Weighting function ωψ in the space D determined by probability density function ψ results as a solution of the following discrete integral equation with K=ΣyεD fr(|y|):
In other words, the weighting function ωψ is defined as a weighting function in which a weighted potential expressed in a discrete fashion takes a constant (K) at each x in response to given ψ.
An approximate value of the weighting function ωψ is determined in response to any function η in the space D by iterating mapping T (mapping from function to function) represented by the following equation (5). The initial value of the function η may be η(x)=1 or η(x)=ψ(x)−1/2 for all xεD in the same way as described above.
If the weighted energy I(φ) of any probability density function φ is defined by the weighting function ωψ determined by a given probability density function ψ and the function fr determined by h satisfying the conditions H1 through H3, energy is minimized with φ=ψ. Here, let φ represent any probability density function, and let X represent a set composed of n points within the space D, and the weighted energy is simplified with a probability limited to 1/n as follows:
wherein the value 1/n is a constant and may be included in ωψ in calculation.
The definitions of the functions and parameters used to define the weighted energy have been discussed. Described below is a method of approximating ψ by φ by decreasing the weighted energy I(φ) if the probability density function ψ is given.
According to the exemplary embodiment, how the probability density function φ is close to the probability density function ψ is quantitatively evaluated by using the weighted energy I(φ). The probability density function ψ is approximated by successively decreasing the weighted energy of φ. The successive decrease of the weighted energy is executed by taking an appropriate point v with respect to each point u, and by varying the φ value of u and v by a predetermined change amount k>0 without changing the total φ value. More specifically, φ(u) and φ(v) are varied as expressed by the following equation:
(u):=φ(u)−k
φ(v):=φ(v)+k
If the φ value exceeds a permissible value, no variation is performed (for example, if updating causes the φ value to be negative).
The values varied in the total weighted energy value are only values related to the point u and the point v and values related to any other two points remain unchanged. The variation may be simply performed only if the values related to only the points u and v expressed by equation (6) in the total weighted energy value (hereinafter referred to as weighted energy decrease amount) are positive. Successive calculations of the weighted energy I(φ) value itself become unnecessary.
A process of decreasing energy on all the points uεD is iterated by a predetermined number of times. An approximate minimum value of weighted energy thus results, wherein the relationship of φ≈ψ holds, i.e., ψ is sufficiently approximated by φ.
The change amount k is typically reduced and converged to zero in an iteration process. In the iteration process, φ approaches ψ, and the change amount k is set to be minimal in order to approximate φ in smaller steps. However, depending on purposes, the change amount k is not fixed but varied within a specific range. Alternatively, the change amount k is restricted to only a predetermined value. More information about the change amount k is provided below.
The probability density function φ may take any real number equal to or larger than zero. If φ is limited to n discrete points (a set of n points in the space D is represented by X, and each point has a probability of 1/n), the probability taken by the probability density function φ is limited to 0 or 1/n (i.e., 1/n for xεX, and 0 for xεD\X). The change amount k is limited to k=1/n.
From the above discussion, it is noted that the total sum of φ values is theoretically fixed to 1 when energy is decreased from the probability density function φ to the probability density function ψ. “Probability” is for mathematical convenience only, and an actual desirable condition is that the total sum of φ values continues to be constant, and is equal to the total sum of ψ values. If φ is limited to discrete n points, the value theoretically taken by φ is 0 or 1/n. In practice, however, no problem arises if φ is 0 or 1, or 0 or 255.
The method of determining the weighting function ω from a probability measure ν or a probability density function ψ, and the method of decreasing the weighted energy defined from the weighting function ω have been discussed. The weighting function ω is a theoretically convenient and appropriate solution. However, the weighting function ω may be defined using another method. Besides the above-described hill climbing method that simply decreases energy, a simulated annealing method may be used. In the simulated annealing method, an increase of a predetermined value is permitted while the permissible amount thereof is reduced.
More specifically, in the distribution evaluation process as illustrated in
In the distribution determination process as illustrated in
A distribution evaluation apparatus, a distribution determining apparatus 10, and an image processing apparatus of the exemplary embodiment are described below in terms of hardware configuration. In the exemplary embodiment, the distribution evaluation apparatus may be understood as part of the distribution determining apparatus 10 and the image processing apparatus may be understood as the distribution determining apparatus in practice. The operation of the image processing apparatus is described together with the hardware configuration of the distribution determining apparatus covering general functions. It is noted that the distribution evaluation apparatus, although being part of the distribution determining apparatus 10, is used alone to evaluate which of two given distribution states is closer to the probability density function ψ.
The distribution determining device 10 of the exemplary embodiment regards an input image as the probability density function ψ, defines the weighted energy (equation (4)), and decreases energy under a predetermined condition about any φ. The distribution determining device 10 thus gains an image sufficiently approximate to ψ.
As illustrated in
The CPU 11 controls the operation of the distribution determining device 10 by executing a predetermined process under the control of a distribution determination program stored on one of the memory 12 and the storage device 13. According to the exemplar embodiment, the CPU 11 reads and executes the distribution determination program from one of the memory 12 and the storage device 13. Alternatively, the distribution determination program may be stored on a storage medium such as CD-ROM and may then be supplied to the CPU 11.
The distribution determining device 10 is a general-purpose computer having the distribution determination program installed thereon. The distribution determining device 10 gains via one of the communication interface 14 and the storage device 13 information about an original image (probability density function) ψ, and a size of the image. The distribution determining device 10 determines an image (probability density function) φ approximating the probability density function ψ in accordance with the gained information. The distribution determining device 10 also gains position information about a located object, and information about the image, and evaluates a distribution in accordance with the gained information.
The data input unit 500 gains, as data, information such as an original image ψ, and the size of the image, and outputs the gained data to the storage unit 510.
The storage unit 510 stores data of the original image ψ input from the data input unit 500. The storage unit 510 also supplies a work area to the distribution evaluator 520 and the distribution determining unit 530.
The distribution evaluator 520 evaluates the goodness of the distribution of an image φ with respect to the original image ψ by a weighted energy value defined by equation (4), using the weighting function ωψ that is calculated in accordance with the original image ψ stored on the storage unit 510. More specifically, the distribution evaluator 520 operates as an evaluation value calculating unit. The evaluation value calculating unit calculates a product by multiplying the mutual influence value determined by the function fr having as a variable a distance between two points x and y, by weighting function values ω(x) and ω(y), and φ(x) and φ(y) values of an image φ defining densities or sizes of two pixels x and y, and then summing the products into the weighted energy. The distribution evaluator 520 calculates the weighted energy as an evaluation value indicating the goodness of the distribution of the image φ to the original image ψ. The process of the distribution evaluator 520 is described in detail below.
The distribution determining unit 530 performs a distribution update process on the image φ stored on the storage unit 510 to modify a φ value at a given point of time. More specifically, in order to decrease the weighted energy value calculated by the distribution evaluator 520, the distribution determining unit 530 varies the density or the size (the φ value) of the input φ such that the weighted energy decrease at the point x defined by equation (6) becomes positive. The process of the distribution determining unit 530 is described in detail below.
The data output unit 540 outputs the evaluation result of the distribution evaluator 520 to one of a communication device 22 and a storage device 24. The evaluation result is the value of the calculated weighted energy or the result of energy decrease provided by the distribution determining unit 530, i.e., the image φ sufficiently approximating the original image ψ.
The process of each of the distribution evaluator 520 and the distribution determining unit 530 is described below. The basic of the processes has been discussed in detail, and an operation obvious from the preceding discussion and an operation obvious in the related technical field are not discussed herein. For example, if an image or a function is defined, no particular discussion is provided about a size or a memory related to the image or the function on the premise that the size and the memory have already been reserved.
The process of the distribution evaluator 520 is described with reference to a flowchart of
The definition method of the weighting function ωψ in S110 in the process of the distribution evaluator 520 is described with reference to a flowchart of
In S250, the distribution evaluator 520 determines whether the update operation of η(x) in S240 has been iterated by a specific number of times. If the update operation of η(x) has not been iterated by the specific number of times, processing returns to S210 to update η(x) for all points xεD. If the update operation of η(x) has been iterated by the specific number of times, processing proceeds to S260 to define ωψ(x)=η(x) at all points xεD. Processing thus ends. For example, the specific number of times as many as 30 times is enough to reach a sufficient convergence.
The process of the distribution determining unit 530 is described with reference to a flowchart of
In S303, the distribution determining unit 530 sets a change amount k>0 for an energy decrease process. In accordance with the k value set herein, the values of the image φ are interchanged by k to decrease the weighted energy. To this end, a point of interest u is selected first in S304. In S305, the distribution determining unit 530 selects a point ν as an interchange destination candidate. In 5306, the distribution determining unit 530 calculates the weighted energy decrease amount defined by equation (6). If it is in S307 determined that the calculated weighted energy decrease amount is equal to or higher than a specific value (zero for example), the distribution determining unit 530 determines that value interchanging is to be permitted. In S308, the distribution determining unit 530 updates φ values as follows:
(u):=φ(u)−k
φ(v):=φ(v)+k
If the calculated weighted value is lower than the specific value, the distribution determining unit 530 determines that the energy decrease responsive to the selected point v is not sufficient. Processing returns to S305. The distribution determining unit 530 selects a next point v. If the point v is selected such that the weighted energy decrease amount of equation (6) is positive, and then the value interchange is performed on the point u, the weighted energy I(φ) decreases as previously discussed. In the selection of the point v, the point u may also be set to be selectable as the point v. If a point that decreases energy is not found, the point v=the point u is automatically selected. No energy decrease is not performed at the point u in practice, and the selection process proceeds to a next point u. As the weighted energy sufficiently decreases, the chance of such occurrence increases.
In S309, the distribution determining unit 530 determines whether the φ value interchange process of all the points u with reference to the appropriate v has been completed. If the φ value interchange process has not been completed, processing returns to S304 to repeat the process on a next unprocessed point u. If the φ value interchange process has been completed, processing proceeds to S310. The distribution determining unit 530 determines whether the update process of the entire image φ has been iterated by a specific number of times. If the update process of the entire image φ has not been iterated by the specific number of times, processing returns to S303. The k value is set to be lower, and the update process of φ(x) is performed on all the points uεD. If the update process of the entire image φ has been iterated by the specific number of times, the distribution determining unit 530 determines that φ is sufficiently approximate to ψ. Processing proceeds to S311 to output the image φ, and then ends. The number of iterations is typically 10 to 100 times.
The process of the distribution determining unit 530 has been discussed. Other points to be taken note of are described below.
In the process of the distribution determining unit 530, a constraint may be imposed on the image φ and the k value as appropriate. If the image ψ takes one of 0 through 255, φ may take one of 0 through 255 as well. The constraint may be that a total of n (for example, n=2, 4, 8, and 16) out of 0 through 255. In this case, when the φ value is interchanged between the two points u and v, an appropriate constraint may be imposed on the value taken by k such that the φ value does not deviate from a permissible value. The constraints, if imposed, provide a lot of usefulness as described below with reference to specific examples.
The selection of the point v with which the point u interchanges the φ values does not necessarily cover the entire space D defining an image. For example, the selection may be limited to a region surrounding the point u. The region for selection may be narrowed as the k value becomes smaller in the iteration process. In the above discussion, the distribution determining unit 530 in the determination operation in S307 permits the φ values to be interchanged if the calculated weighted energy decrease is equal to or above the specific value. The exemplary embodiment is not limited to the determination operation. For example, a point v that causes a maximum weighted energy decrease amount to result may be used. Alternatively, upon turning the weighted energy decrease amount positive, that point v may be immediately used. Typically, the point v that causes the weighted energy decrease amount positive may be a candidate. In accordance with the concept of the simulated annealing method, a point v having a negative weighted energy decrease amount may be permitted in the earlier iterations.
In the following examples, the weighting function ωψ is determined based on an actual original image ψ and an image is generated in accordance with the distribution determining method of the exemplary embodiment of the present invention.
The weighted energy (equation (4)) of the image is defined using the weighting function ωψ. A density distribution is determined by decreasing the weighted energy sufficiently with the φ value of any function (image) φ varied at each point u in accordance with the distribution determination process of the exemplary embodiment (as described with reference to the flowchart of
The weighting function ωψ of
As described above, the original image ψ and any initial image φ are theoretically defined as probability density functions, and the total sums of the pixel values of the two images are to be constantly equal to each other. To this end, the initial image φ is to be defined such that the total sum of the pixel values of the initial image φ is equal to the total sum of the pixel values of the original image ψ. From this standpoint, it is convenient that φ(x) is defined as φ(x)=1/ωψ(x)2 based on K=ΣyεD fr(|y|). This is because the total sum of the pixel values of 1/ωψ(x)2 is approximately equal to the total sum of the pixel values of the original image ψ. From the standpoint of energy decrease, the initial image φ is also acceptable if the initial image φ is not defined such that the total sum of the pixel values of the initial image φ is equal to the total sum of the pixel values of the original image ψ. In this case, energy decreasing may result in an image sufficiently close to but different from the initial image only in terms of an average density.
A color decreasing process and a halftone process may be performed by limiting a value taken by the probability density function φ (any initial image). For example, if the value taken by the probability density function φ is limited to a specific value, the color decreasing process may be performed. If the value taken by the probability density function φ is limited to two values, the halftone process may be performed.
A mixed-dot-size halftone process may be performed as a display method of the color decreasing process described with reference to the specific example 2. In the mixed-dot-size halftone process, a dot size may be assigned instead of density. Another constraint may be included.
As clear from the above discussion, the specific examples 1 through 3 are identical in configuration but different in constraint during energy decreasing. More specifically, the specific examples 1 through 3 operate under the same concept of “the distribution of the located objects different in density or size responsive to the probability density function under energy decrease.” The specific example 1 is free from any constraint, in practice and takes any density. The specific example 2 is subject to a limitation in the selectable density. The specific example 3 displays the image in density in place of size. Particularly, in the specific example 3, a restriction is imposed on the dot size depending on an image region within the image. From the standpoint that the exemplary embodiment allows the constraints to be imposed in view of the basic principle of the weighted energy, the specific examples 1 through 3 may be treated in a consistent fashion. The image compression in the specific example 1 serves the purpose of increasing a compression rate by compressing a blurred image, and this is additional usefulness.
The halftone process faithfully restoring an original image described with reference to the specific examples 2 and 3 (dot layout of two values) may be interpreted as a “distribution process of located objects faithfully conforming to the probability density function ψ” in a general sense. There is an actual challenge that “limited resources (for example, n resources) are to be efficiently located in order to efficiently meet a given distribution demand.” The exemplary embodiment may provide a solution to such a challenge.
Energy decrease is possible even if the initial image φ is not defined such that the total sum of the pixel values of the initial image φ is equal to the total sum of the pixel values of the original image ψ. The number of objects to be located (the total number of points in binary image) may be set to be any number n.
As described with reference to the specific example 1, energy is set up by determining the weighting function ωψ from the original image ψ, and the original image ψ is restored by decreasing energy of the image φ. As described with reference to the specific example 2, the constraint is imposed on the value taken by the image φ. The energy decreasing under the constraint causes φ to converge to an image φ not matching but sufficiently approximate to the original image ψ. The original image ψ is only one, but a large number of images φ sufficiently approximate to the original image ψ are present. The use of multiple images φ allows non-degraded information to be embedded in one of the images.
The foregoing description of the exemplary embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2011-256085 | Nov 2011 | JP | national |