Hi everyone! For a project I’m working on, I need to get a certain colored pixel from the camera. But I’ve ran into a problem; the camera works fine for a normal image you would get from the image library, but when you try letting the image take it from the camera, it tells you the method ‘get’ is not valid, or the image is not valid. Any ideas?
@Prynok Do you have a still image from the camera. I was able to do a get from an image from the camera without a problem. Just sample code below
function draw() -- This sets a dark background color
background(40, 40, 50)
if xx~=nil then
elseif img~=nil then
if t.state==BEGAN then
@dave1707 Thanks, I got it working, your way is probably easier though!
CAMERA is simply the string “CAMERA.” You needed to use image(CAMERA):get(…)
While @SkyTheCoder’s method works, it’s slower since you need to rasterize the image every time you want to get a pixel. He probably knows that, though. That was just for demonstration purposes.