read photo's pixel data , 1 by 1

ALPHY PSYCHE's icon

How can i read photos pixel information and have them 1 by 1 from beginning to the end ? something in matrix somehow. but give the results each 500 ms.

Rob Ramirez's icon

jit.iter, jit.spill or jit.matrix getcell message

ALPHY PSYCHE's icon

but they read movies not pictures . i try them for read a pic and give me datas . but i couldnt !

Len Richardson's icon

You can also load single images like Jpegs into a jit.matrix.

Max Patch
Copy patch and select New From Clipboard in Max.

ALPHY PSYCHE's icon

but the jit.cellblock object must have a same rows and columns as my imported picture . cuz in this situation it just gives bunch of 255 s

Max Patch
Copy patch and select New From Clipboard in Max.

Len Richardson's icon

Please take a look at the jit.matrix help file. Your jit.matrix consists of 4 planes. By default jit.cellblock shows the 1st plane (plane 0) which is the alpha channel. The help file sums it up pretty well in my opinion.

ALPHY PSYCHE's icon

i know buddy but its not working well . look at this patch and import some pictures. it give me different wrong answers

Max Patch
Copy patch and select New From Clipboard in Max.

ALPHY PSYCHE's icon

i want my matrix dimensions and picture dimensions be the same .
thanks

Len Richardson's icon

You need to toggle vertical and horizontal sync in the cellblock inspector.

Max Patch
Copy patch and select New From Clipboard in Max.


Rob Ramirez's icon

it's a quirk of jit.cellblock that you must send the "plane" message after sending in a matrix, so use the trigger object ("t") to sequence those messages:

Max Patch
Copy patch and select New From Clipboard in Max.

ALPHY PSYCHE's icon

thanks . that's really help .