change in value of pixel after binarization

OpenMV related project discussion.
pso
Posts: 1
Joined: Fri Sep 22, 2017 11:13 am

change in value of pixel after binarization

Postby pso » Fri Sep 22, 2017 11:32 am

Hi,

I have binarized an image.
And now, I would like to know the number of pixel per line value change.
Is there existing a function to do it ?

For example :
1 line of my image is : (0,0,0,0,0,0,0,0,255,255,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255)
There are 3 changes

I hope to be understandable

thank you
User avatar
kwagyeman
Posts: 2404
Joined: Sun May 24, 2015 2:10 pm

Re: change in value of pixel after binarization

Postby kwagyeman » Fri Sep 22, 2017 5:01 pm

There's no method to do run length compression in the python interface level. You can either code the algorithm in C and it will run extremely fast or you can code it in Python and it will run very slow.

If you want help coding it in C I can provide the steps.
Nyamekye,

Return to “Project Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests