The objective function assign a high value to hypotheses that are not wounds, and a low value to hypotheses that are wounds. That is the intention of the objective function, but constructing such an objective function is not an easy task.
70
A strictly correct objective function must always return a better score for true hypotheses than for false hypotheses. Let βπππ’π be the set of all true hypotheses, which
also means that the complementary set βΜ πππ’π is the set of all false hypotheses. A strictly correct objective function must satisfy the following criterion:
Ξ(βπππ’π) < Ξ(βπΉπππ π), β βπππ’π β βπππ’π
βπΉπππ π β βΜ πππ’π (4.4)
Even humans ability to recognize wounds adhere to this criterion, and we do not expect our objective function to be strictly correct. In fact, wound images are varied, and complex; our objective function does perform, but not to the level required of an autonomous robot operating system.
The objective function consist of simple shape and textural properties, typical of wounds. The objective function uses a combined weighted sum and weighted product model of these properties. The weakest aspect of our approach is that we rely on hand- hand tuning these weights. In section 4.6.3, we discuss a method to optimize the objective function automatically.
4.2.1 Shape Properties
We make use of five simple shape properties in the objective function. These prioritize large non-jagged hypotheses, without hulls. They punish hypotheses with too many disconnected components, and hypotheses that collide with the image edge. First, we explain what we mean by components and hulls. Then, we define sub-properties we make use of, and finally we define the shape properties.
A component refers the number of connected components. Superpixels in the hypothesis that are connected comprise one component. We can consider superpixels to be nodes in a graph, and let these nodes have undirected edges towards all its neighbors. Then a connected component is simply a strongly connected component of that graph. We exploit this by using Matlab graph functions. Further, a hull is an interior part of one of the components of the hypothesis. These hulls are components of the inverse hypothesis. The inverse hypothesis components may also contain background components, containing superpixels on the image border. We can easily separate the hull and background components, by testing if any of their superpixels are on the image edge.
71 We derive the shape properties from even simpler properties. These sub- properties are:
ο· π΄βπ’ππ, is the total area of all the hulls of the hypothesis. ο· π΄βπ¦π, is the area of the hypothesis.
ο· ππππππππππ‘π , is the number of components of the hypothesis.
ο· πβπ¦π, is the outer perimeter of the hypothesis. The outer perimeter excludes the hull perimeter.
ο· πβπ¦πβππππππ, is the outer perimeter of the hypothesis that also lies on the image
border.
ο· π΄π€ππ’ππ, is the total area of the wound-labeled superpixels. This is not a shape
property, but the derived property in equation (4.7), is.
The shape property πΎβπ’πππ ππ‘ππ, is the ratio of hulls. When there are no hulls, its value is
zero. πΎπ ππ§π, is optimal when the hypothesis is as large as possible, and ranges between zero and one. πΎπππππππππ π , is optimal when the perimeter is small compared to the filled
hypothesis size. This should prevent jaggedness. πΎππππππ, is optimal when no superpixels in the hypothesis lies on the image edge. πΎπππππππ‘ππ£ππ‘π¦, aims to prevent too many components and starts to increase exponentially when the number of components is surpasses five. These shape properties are defined as follows:
πΎβπ’πππ ππ‘ππ = π΄βπ’ππ π΄βπ¦π+ π΄βπ’ππ (4.5) πΎπππππππ‘ππ£ππ‘π¦ = 1.2max (0,ππππππππππ‘π β5) (4.6) πΎπ ππ§π = 1 β π΄βπ¦π π΄βπ¦π+ π΄π€ππ’ππ (4.7) πΎπππππππππ π = πβπ¦π 2 π΄βπ¦π+ π΄βπ’ππ (4.8) πΎππππππ = πβπ¦πβππππππ2 π΄βπ¦π+ π΄βπ’ππ (4.9)
72
4.2.2 Textural Properties
Our objective function uses two textural properties. The first property Ξ³π€ππ’ππ, indicates how well the hypothesis matches the predicted wound-labeled superpixels. The second property πΎπ€ππ’ππPππππRππ‘ππ, indicates how well the hypothesis matches the predicted wound-labeled superpixel edges. Note that we use the term textural, because we obtain the labels by classifying textural features of superpixels. The first property relies on two sub-properties. These two sub-properties are:
ο· Ξ³π€ππππππ πππ, is the ratio of the hypothesis area predicted to be a wound.
ο· Ξ³π€ππππππ, is the ratio of the wound-predicted area selected by the hypothesis.
Now, we can combine these two sub-properties as defined in equation (4.10).
Ξ³π€ππ’ππ = 1 β βΞ³π€ππππππ πππΞ³π€ππππππ (4.10)
It is not obvious why we define Ξ³π€ππ’ππ as follows, but this definition has some attractive traits. Obviously, the property should be at its maximum when the hypothesis simultaneously covers all wound area, and only consists of wound area. Contrarily the property should be at its minimum when the hypothesis covers none of the wound area, and consists of no wound area. The property should have an intermediate value when the sub-properties have intermediate values. In addition, the two sub properties are also symmetrical. More formally, these traits are as follows:
ο· Ξ³π€ππ’ππβ [0,1] ο· Ξ³π€ππππππ πππ = 0 Ξ³π€ππππππ= 0 βΊ Ξ³π€ππ’ππ= 1 ο· Ξ³π€ππππππ πππΞ³ = 1 π€ππππππ= 1 βΊ Ξ³π€ππ’ππ= 0 ο· Ξ³π€ππππππ πππ = 0.5 Ξ³π€ππππππ= 0.5 β Ξ³π€ππ’ππ= 0.5 ο· Ξ³π€ππ’ππ= π(Ξ³π€ππππππ πππ,Ξ³π€ππππππ) β π(π, π) = π(π, π)
It is important that the Ξ³π€ππ’ππ property require both of the sub-properties to have decent values. If we had just added the two sub-properties together, then one of them would take priority over the other property.
The second textural property is simply the ratio of the hypothesis perimeter that classifies as wound edges. Note that every superpixel edge are classified for either of the two directions, and that the second property, πΎπ€ππ’ππPππππππ‘ππRππ‘ππ, is the ratio of wound edge along the hypothesis perimeter, when we use the correct direction.
73
4.2.3 Combining the Object Properties
In equation (4.12), we combine the shape properties in section 4.2.1 to the Ξπ βπππ property using a weighed sum model. Similarly, we use a weighted sum model to combine the textural properties in section 4.2.2 to the Ξπ‘ππ₯π‘π’πππ property, as seen in equation (4.11). We create objective function by combining Ξπ βπππ and Ξπ‘ππ₯π‘π’πππ using a
weighted product model that we define in equation (4.13). Ξ = Ξπππ‘π½1Ξ
π βππππ½2 (4.11)
Ξπ‘ππ₯π‘π’πππ = π½3Ξ³π€ππ’ππ + π½4(1 β πΎπ€ππ’ππππππππ ππ‘ππ) (4.12)
Ξπ βπππ=π½5πΎβπ’πππ ππ‘ππ+π½6πΎπππππππ‘ππ£ππ‘π¦+π½7πΎπ ππ§π +π½8πΎπππππππππ π +π½9πΎππππππ (4.13) We hand tuned the weights using example images. We used the image W2, from results section 4.4. The few other images used to hand-tune the weights are not present in this thesis, as we were unable to verify the source of the images, and we were therefore unable to obtain permission to use them. The weights we used in the section 4.4 results are listed in Table 4-1.
Table 4-1 Objective Function Weights
The table lists the objective function weights used for the results in section 4.4.
Weights Weight Values
π½1 1.0 π½2 4.0 π½3 1.0 π½4 1.0 π½5 1.0 π½6 0.01 π½7 0.7 π½8 0.01 π½9 0.1
Note that the objective function is undefined for empty hypotheses, and therefore, we simply return a penalty value of 10.
Unfortunately, we made a small error when computing the results in section 4.4. In the MATLAB code, our Ξπ‘ππ₯π‘π’πππ property had two other terms, which were both set
to 0.5, when they should have been set to zero. We show this Ξπ‘ππ₯π‘π’πππ version in equation (4.14). We do not show comparisons here, but the two Ξπ‘ππ₯π‘π’πππ versions are
74
still similar. The biggest difference between them is that the added terms renders the segment classifications more important than the edge classifications.
Ξπ‘ππ₯π‘π’πππ = π½3Ξ³π€ππ’ππ + π½4(1 β πΎπ€ππ’ππππππππ ππ‘ππ)
+ 0.5(1 β Ξ³π€ππππππ πππ) + 0.5(1 β Ξ³π€ππππππ) (4.14)