extract grayscale value from camera-input

JCN87's icon

I'm working on a project for school, just started out with MaxMSP. I want to extract the grayscale value from a webcamfeed, and convert this to a numeric code

I know it's possible via the suckah, but I want to avoid having to click to extract the colorvalue, and want it done live/direct

anybody got ideas or steps in the right direction?
thanks

joshua goldberg's icon

jit.3m

On Apr 21, 2008, at 7:25 AM, seniman101 wrote:

>
> I'm working on a project for school, just started out with MaxMSP. I
> want to extract the grayscale value from a webcamfeed, and convert
> this to a numeric code
>
> I know it's possible via the suckah, but I want to avoid having to
> click to extract the colorvalue, and want it done live/direct
>
> anybody got ideas or steps in the right direction?
> thanks

jasch's icon

convert to greyscale: jit.rgb2luma

then : analyse the image with getcell $1 $2 (equiv to suckah's click
on a pixel)

downsampling is always useful: insert [matrix 1 char 16 12] to get an
image with 16x12 meta-pixels

etc etc.

/*j

On 21.04.2008, at 13:25, seniman101 wrote:

>
> I'm working on a project for school, just started out with MaxMSP. I
> want to extract the grayscale value from a webcamfeed, and convert
> this to a numeric code
>
> I know it's possible via the suckah, but I want to avoid having to
> click to extract the colorvalue, and want it done live/direct
>
> anybody got ideas or steps in the right direction?
> thanks

joshua goldberg's icon

jasch is almost always right, but in this case he's not.

if you run a 4 char 320x240 matrix through a jit.matrix 4 char 32 24
object, it will actually give you every 10th pixel. jit.matrix does
not average.

using jit.3m on a 1 char matrix will give you the average of the frame
out of the 2nd outlet.

if you install the cv.jit set (ALWAYS a good idea), you can get a true
averaged lower-res matrix with cv.jit.resize.

On Apr 21, 2008, at 9:26 AM, jasch wrote:

> convert to greyscale: jit.rgb2luma
>
> then : analyse the image with getcell $1 $2 (equiv to suckah's click
> on a pixel)
>
> downsampling is always useful: insert [matrix 1 char 16 12] to get
> an image with 16x12 meta-pixels
>
> etc etc.
>
> /*j
>
>
> On 21.04.2008, at 13:25, seniman101 wrote:
>
>>
>> I'm working on a project for school, just started out with MaxMSP.
>> I want to extract the grayscale value from a webcamfeed, and
>> convert this to a numeric code
>>
>> I know it's possible via the suckah, but I want to avoid having to
>> click to extract the colorvalue, and want it done live/direct
>>
>> anybody got ideas or steps in the right direction?
>> thanks
>

list1's icon

At 5:25 AM -0600 4/21/08, seniman101 wrote:
>I'm working on a project for school, just started out with MaxMSP. I
>want to extract the grayscale value from a webcamfeed, and convert
>this to a numeric code
>
>I know it's possible via the suckah, but I want to avoid having to
>click to extract the colorvalue, and want it done live/direct
>
>anybody got ideas or steps in the right direction?
>thanks