get profile of an live image, with a draggable Line

Update : I updated the code with some added feature (toggle autoscaling, gaussian filtering…) but most important, a big optimization step. Nearly twice better refresh time (19fps instead of 10) thanks to a matplotlib « set_data » function.

Original Text: I needed a kind of ImajeJ with live images. It is actually already existing with « micro-manager » which is base on ImageJ and have a big support for a big amount of cameras (and other microscopy hardware).

But I also needed more than one line. And in informatic, there are 3 numbers : 0, 1 and « n ». So I made possible « n » lines.
More over, for some reasons, sometimes the profile is live updated, sometimes not.

Here you are the webcamProfile Python script. I will probably describe the code more in detail in a next article. and also compile it in order to have easier installtion.
If you add that configuration of camera is not really « saveable », you understand why I thought I could do it better myself.

WebcamProfile v2

In the same action, I’ve learn PyQT and more precisely event handling and sygnals/slots mecanisms.

Known bug : does not handle any « camera choice » (in a coming version)

I tried to optimize speed, in order to get good « real time » acquisition and found an impressive (more than 8000 time faster!) optimization against standard OpenCV function.