For background, check my answer under this question.
It is clearly stated in the documentation of HighlightImage that the 2nd argument,roi, (region of interest) can be any form of Graphics primitives. So, in my interpretation, all sorts of things that can be presented in Graphics shall work here.
It seems that in most occasions, this rule works quite well, but check this:
img=Graphics[FilledCurve[{{Line[{Scaled[{0.66, 0.21}],
Scaled[{0.83, 0.5}], Scaled[{0.66, 0.78}], Scaled[{0.33, 0.78}],
Scaled[{0.16, 0.5`}],
Scaled[{0.33, 0.21}]}]}, {Line[{Scaled[{0.58, 0.35}],
Scaled[{0.66, 0.5`}], Scaled[{0.58, 0.64}],
Scaled[{0.41, 0.64}], Scaled[{0.33, 0.5`}],
Scaled[{0.41, 0.35}]}]}}]]
HighlightImage[Graphics[{Blue, Disk[]}], img, {"Desaturate", .7}]
I suppose the result image of HighlightImage shall desaturate the part inside and outside the FilledCurve, but in fact, HighlightImage seemingly ignore FilledCurve's filling totally and highlighted only the edge part. Weird. Is this a bug?
The second problem is even more serious and wierder.
Maybe we can say HighlightImage will failed to recognize FilledCurve or so, but It can, of course, recognize Disk:
HighlightImage[Graphics[{Blue, Disk[]}],
Disk[Scaled@{1/2, 1/2}, Scaled[1/4]], {"Lighten", .7}]
But simply a style change will make it fail: change "Lighten" to "Blur"
HighlightImage[Graphics[{Blue, Disk[]}],
Disk[Scaled@{1/2, 1/2}, Scaled[1/4]], {"Blur", 3}]
Even more weird.
So, is this a bug or I wrote the code in a wrong way? How can I fix it?






HighlightImage[Graphics[{Blue, Disk[]}], Disk[Scaled@{1, 1/2}, Scaled[1/4]], {"Blur", 20}]I can clearly see the blurred blue disk. – Batracos Jul 18 '16 at 22:47HighlightImage– m_goldberg Jul 19 '16 at 03:31