Hi,

I would like to find the fastest way to convert img data array to required 
input for ScatterPlotItem.setData.

at the moment i have something like that:

            self.data = scipy.misc.imresize(self.data, (200, 300))

            for x in range(self.data.shape[0]):
                for y in range(self.data.shape[1]):
                        self.new.append((x, y, self.data[x][y]))

            self.new = array(self.new) 
self.scatter.setData(pos=self.new, color=(1, 1, 1, .3), size=0, pxMode=True)

As is written in Scatter Plot Item documentation:

>         **Arguments:**
>         pos                   (N,3) array of floats specifying point 
> locations.
>

When i grab img from camera using cv2 i have [MxN] array.


So, this two "for" loops taking a lot of time and also convert later self.new 
= array(self.new) takes also a lot of time. If i convert my real img to 
size 200x300 then is ok, i can see real time cloud points plottng, but if i 
would try to calculate Full HD or just HD img, it takes a lot of time, and 
i can't see real time plotting. I would like also add that this calculating 
i use in another thread. Is there any fastest way to convert this data to 
get real time 3D cloud plotting in HD or Full HD image? Greetings. 

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/9b4cffe7-12a6-4a72-b09f-00e6c0b76ad7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to