简体   繁体   中英

Accord.net TemplateMatch[]

Hey Iam trying to match 2 bitmaps which ConvertedTo24bpp. But its running in to a endless loop it never ends the machting process. The programm stops after 60secs.

http://accord-framework.net/docs/html/T_Accord_Imaging_ExhaustiveTemplateMatching.htm

TemplateMatch[] templateMatcheArray = exhaustiveTemplateMatching.ProcessImage((new ResizeBilinear(bitmapGetImage.Width / scale, bitmapGetImage.Height / scale)).Apply(bitmapGetImage),
                (new ResizeBilinear(bitmapConverted.Width / scale, bitmapConverted.Height / scale)).Apply(bitmapConverted));

I fixed it the problem was the ResizeBilinear Class. Iam using this before I templateMatch and it works.

ResizeBilinear resizeBilinear = new ResizeBilinear(200, 200);
        bitmapConverted = resizeBilinear.Apply(bitmapConverted);
        bitMapTemplate = resizeBilinear.Apply(bitMapTemplate);
        //comparing our to bmp
        TemplateMatch[] templateMatcheArray = exhaustiveTemplateMatching.ProcessImage(bitmapConverted, bitMapTemplate);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM