Problem with Ketai Camera
- import ketai.camera.*;
- KetaiCamera video;
- void setup() {
- video = new KetaiCamera(this, 640, 480, 15);
- }
- void draw() {
- // image(video, width/2, height/2);
- }
- void onCameraPreviewEvent()
- {
- video.read();
- }
- void mousePressed()
- {
- if (video.isStarted())
- {
- video.stop();
- }
- else
- video.start();
- }
java.lang.NullPointerException
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:474)
at processing.core.PImage.resize(Unknown Source)
at ketai.camera.KetaiCamera.determineCameraParameters(KetaiCamera.java:891)
at ketai.camera.KetaiCamera.start(KetaiCamera.java:421)
at processing.test.ketaicameratest.KetaiCameraTest.mousePressed(KetaiCameraTest.java:44)
at processing.core.PApplet.handleMouseEvent(Unknown Source)
at processing.core.PApplet.dequeueEvents(Unknown Source)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:856)
Exception caught while trying to connect to camera service. Please check your sketch permissions or that another application is not using the camera.