Hi @Lion66
I am not convinced. Your file has 2 sets of functions.
Contour features
Mophological operations
Don't you think it is more natural to have them in 2 files?
Your sources come into 2 links.
Having one file is like combining 2 links into one. For learning purpose, it will be difficult to spot what you need in bigger files.
I am not sure to understand the question.
A mask should be a grayscaled image.
Black pixel in the mask, means ignore the pixel, otherwhise. the pixel is not ignored.
A pixel that is transparent (opacity == 0), will appear as the background.
If the background is white, you will think that the pixel is white, even if it is not.
The pixel is simply not displayed.
That is why the mask provided does not work.
When an image can be in multiple backgrounds, a mask can help you ignore the background.
Black pixel means ignore the pixel. A mask where the background is black, but the shape of the template is white, will help you find the template regardless of its background.
Yes
_cveMatNumberOfChannels($mat)
For an example of usage of _cveSplit, look at discrete_fourier_transform.au3#L100
Based of the example it should be (not tested)
Local $planes[3] = [_cveMatCreate(), _cveMatCreate(), _cveMatCreate()]
_cveSplitMat($img, $planes);
The alpha channel is the third channel.
Remember, values go from 0 to 255.
0 means transparent.
255 means opaque.
No problem. I will be busy for the next 4 weeks but I will try to answer your questions as fast as I can.