15 Apr 2013, 13:16
Generic-user-small

Adrian R. Perdomo (3 posts)

Great book so far, but now I am really getting stuck int in the project-game Magic Marker. After running the app and tapping on the screen to start the camera I get only a black screen. When I do a println() to check what values are being passed I get zero all the time: color pixelColor = cam.get(x, y); println(“cam get values: “ + pixelColor + “red: “ + red(pixelColor) + “\n” + “green: “ + green(pixelColor) + “\n” + “blue: “ + blue(pixelColor) + “\n”); Not sure if there is something missing from the example codes, I have tried to run also the example from the “download code” from the eBook, but the results are the same. Tried also to change high and low parameters and to wave a red light on the camera. Any help would be appreciated. thanks

16 Apr 2013, 20:19
Ds_2009_mpark_pragsmall

Daniel Sauter (46 posts)

Dear Adrian, the app should start up with a black screen, if you tap once, the camera preview starts up. Now you should grab red and blue objects, which will leave traces on the preview image, and you can see the individual score bar go up. Make sure the camera is still and the scene is lit well enough so that the colors can be picked up. If one color reaches 50%, it “wins”, and we start over. I hop this helps. Best, Daniel

  You must be logged in to comment