Template marching in image processing with Dynamo and A.Forge library

Hi guys! I am trying to develop an algorithm in Dynamo using the A.Forge library for template matching, but I didn’t have any results from my attemps.

Could you help me to figure it out?
Here, the link to the library I am using for it.
The scope is the use of template matching for percolation algorithm in order to detect the orientation of cracks in images.

I thank you in advance!


1 Like

It seems interesting, could you share what you have tried so far? :slight_smile:

Yes, thank you, I attach here the two alternatives, I have difficulties with the definition of the inputs,

and in understanding the difference between the two methods.

Are those nodes from any package on the Dynamo package manager or just dll loaded into Dynamo?

It is a loaded dll.

This is the flow I followed:


Hi Silva,

I am not very familiar with AForge, but after a bit of googling it seems that the ProcessImage() method only accepts bitmaps of 8bits.

I used photoshop to convert some images to 8bpp and it seems to work find on my end.


Can you post the two images btmap emplyed here? Thank you very much!

sure thing!

1 Like

Thank you very much! Very useful!