Comments (3)
Hi, I'd like to bump this issue.
This library is great on windows/mac, but nearly two years later and it seems the same problems still exist with core Processing libraries in Android mode. Ketai works with the camera and wraps android's face detection, but openCV marker detection is what I'm looking for.
from opencv-processing.
im in the same boat right now, im trying to use Ketai camera and combine it with opencv's face detection but its currently giving me bugs.
if you just want face detection i ended up using Ketai's face tracking:
NOTE: you have to have Ketai and android mode install within processing3 for this to work
import ketai.camera.*;
import ketai.cv.facedetector.*;
KetaiCamera cam;
PImage video;
int low = 30;
int high = 100;
int camWidth = 640;
int camHeight = 480;
int MAX_FACES = 20;
KetaiSimpleFace[] faces = new KetaiSimpleFace[MAX_FACES];
void setup() {
orientation(LANDSCAPE);
imageMode(CENTER);
stroke(0, 255, 0);
strokeWeight(2);
noFill();
rectMode(CENTER);
cam = new KetaiCamera(this, camWidth, camHeight, 30);
// 0: back camera; 1: front camera
video = createImage(camWidth, camHeight, RGB);
}
void draw() {
if (cam != null && cam.isStarted()) {
cam.loadPixels();
for (int y = 0; y < cam.height; y++) {
for (int x = 0; x < cam.width; x++) {
color pixelColor = cam.get(x, y);
video.set(x, y, pixelColor);
}
}
video.loadPixels();
image(video, width/2, height/2, width, height);
//scale(2);
faces = KetaiFaceDetector.findFaces(video, MAX_FACES);
for (int i=0; i < faces.length; i++)
{
//We only get the distance between the eyes so we base our bounding box off of that
rect(faces[i].location.x, faces[i].location.y, 2.5*faces[i].distance, 3*faces[i].distance);
}
}
}
void mousePressed()
{
if (cam.isStarted()) {
cam.stop();
} else {
cam.setCameraID(1);
cam.start();
}
}
void onCameraPreviewEvent()
{
cam.read();
}
from opencv-processing.
Hey, I managed to get marker detection working great for AR on Android using Ketai and nyARToolkit. Here's a link to an older post:
https://discourse.processing.org/t/augmented-reality-made-easy/12692/2
It's not the final working code, but it might give you some ideas.
from opencv-processing.
Related Issues (20)
- Error in opening movie files HOT 2
- Issue to built the lib for Raspberry PI (arm and x86) HOT 2
- setROI()
- How can i used your library in Netbeans IDE ?
- Request: Update to OpenCV 3.0?
- Library Processing.video error HOT 2
- crash while running P3D, P2D
- Display contours over image HOT 1
- issue with getAverageFlowInRegion HOT 1
- I cannot find radon transform.
- LiveCamTest.pde is crashing on macOS Catalina HOT 2
- Can't load library in macOS Catalina HOT 1
- All examples give NullPointerException error HOT 5
- OpenCV not Working on Processing 3, on Ubuntu 18.04
- Illegal reflective operation warning in Processing 4 HOT 1
- HSVColorTracking Example not responding
- UnsatisfiedLinkError HOT 6
- Update readme or merge latest development with this repo? HOT 2
- [JAVA opencv library] Have you tried the 'WhichFace' example?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv-processing.