OpenCv CreateImage Function isn’t working

Since there aren’t that many good examples how to create new blank image filled with a color using cv2, here’s one: Create OpenCV image of certain (R, G, B) color: import cv2 import numpy as np def create_blank(width, height, rgb_color=(0, 0, 0)): “””Create new image(numpy array) filled with certain color in RGB””” # Create black … Read more

How can I perform facial recogntion on iOS?

On iOS 5 you can use CoreImage (CIDetector, CIFeature, CIFaceFeature should be named as the relevant keywords) for that task. Check out the SquareCam example App from Apple, it includes face detection. If you’re targeting older iOS versions, openCV seems to be a good approach. http://developer.apple.com/library/ios/#samplecode/SquareCam/Introduction/Intro.html Edit_: Argh, soory. CoreImage can only detect faces but … Read more

OpenCV’s Canny Edge Detection in C++

Change this line cvtColor( image, gray_image, CV_RGB2GRAY ); to std::vector<cv::Mat> channels; cv::Mat hsv; cv::cvtColor( image, hsv, CV_RGB2HSV ); cv::split(hsv, channels); gray_image = channels[0]; The problem seems to be that your hand in gray scale is very close to the gray background. I have applied Canny on the hue (color) because the skin color should be … Read more