Forums > MaxMSP

extract grayscale value from camera-input

April 21, 2008 | 11:25 am

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


April 21, 2008 | 11:45 am

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


April 21, 2008 | 1:26 pm

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 16×12 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


April 21, 2008 | 2:25 pm

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

if you run a 4 char 320×240 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 16×12 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
>


April 21, 2008 | 2:41 pm

http://cycling74.com/products/cyclops

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


Viewing 5 posts - 1 through 5 (of 5 total)