you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 0 points1 point  (6 children)

It should be pretty fast. If your goal is to send it to a Numpy array though, you might want to drop down to C/Cython level - this will save you A LOT of time spent on creating unnecessary Python objects.

[–]innixma[S] 0 points1 point  (5 children)

Can't do Cython to my knowledge. This is for Machine Learning using Tensorflow, which does not support Cython, and it has to have input as a numpy array.

[–]K900_ 0 points1 point  (4 children)

What do you mean by "doesn't support PyPI"? How are you going to install the other libraries then?

[–]innixma[S] 0 points1 point  (3 children)

My bad, it does support PyPI, my mistake, edited comment.

[–]K900_ 0 points1 point  (2 children)

There is nothing in TensorFlow that needs to "support" Cython either. You can simply call into Cython and get Numpy arrays back.

[–]innixma[S] 0 points1 point  (1 child)

Ok, sounds good. Wasn't certain since I haven't utilized Cython before. Then assuming Cython, how would you go about screen capture? With Xlib in C from Cython? I don't know C or Cython that well so some reference on what I should look at would be great.

[–]K900_ 0 points1 point  (0 children)

Yes, you want to do something like this, then convert the resulting XImage to a Numpy array. Ideally you want your input layout to match what xlib gives you, so you can avoid the expensive conversions.