cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Fast Histograms without Vision

I tested Sys_BuildHisto(1).vi

I am suprised because I get a mean value of 18 ms for the 8 bit image to be histogrammed, with d=2, and with d=4 6 ms.

So times 3 (for the 3 colors), I get a speed of 54 ms for d=2 and 18 ms for d=4
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 kudos
Mensaje 11 de 19
2.411 Vistas
word!

I think the nested for loop, indexing pixels, is the most efficient way to do it.
0 kudos
Mensaje 12 de 19
2.409 Vistas
Hi here is the optimized version of your VI by Machine Vision.

Optimized Image decoding for 24 bit images.

Optimized Histogram computation. Note that if I run the 3 histo processes in parallel on my PC I get 200 ms total time
while if I run one after the other I get a total time of 20 ms ... I already noticed this but nobody was ever able to explaim me why I have this strange thing when I run parrallel loops

So now there is a total time of 50 ms on my PC, so I am sure you can do better on yours.

Cheers
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 kudos
Mensaje 13 de 19
2.409 Vistas
Just tried your code.  It does not look like the histogram is correct.
0 kudos
Mensaje 14 de 19
2.406 Vistas
I am surprised because I compared the images extracted by the 2 methods and they where identical.

The computation of the histogram is based on your implementation which seems correct... where is the difference comming from ?

Cheers
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 kudos
Mensaje 15 de 19
2.386 Vistas
Sorry, the histogram was a U8 type, so it could only stack up to 255 points. I modified it to U32, now you can put a very large picture... and it seems to work fine if I compare it to the results of Vision Assistant.

Cheers
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 kudos
Mensaje 16 de 19
2.386 Vistas
Ok, in my first code, a few pieces of code were taking too long.  I optimized it for indexing image arrays, pixel by pixel.   I am posting my system version subVI.  There's some saturation indicators in this code also.  I am able to achieve full 3 channel histograms (with grayscale channel outputs) at 7.5fps on my 1.4Mpixel image with only decimating by 3.  If I compute the histogram on the entire image (no decimation), then I can get 1.5fps which is pretty fast in my opinion.  I am also attaching a screenshot of my software so you guys can see what outputs I am getting in real-time.  It's strange, when I use the performance monitor, my performance goes down significantly, so I'm not sure of the actual subVI execution times, but it looks like it runs in about 100ms with a decimation of 3 (and I know decimation may not be the correct term for this).
0 kudos
Mensaje 17 de 19
2.378 Vistas
did you used the VI I posted ?

Cheers
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 kudos
Mensaje 18 de 19
2.376 Vistas
no, I did not as I need to be able to adjust the decimation factor in real-time.  I am happy with the speeds of my solution.
0 kudos
Mensaje 19 de 19
2.372 Vistas