This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool find_large_contour_center_of_gravity(cv::Mat &src_img, cv::Point &result) | |
{ | |
cv::Mat gray_img, bin_img, erode_img, dilate_img; | |
std::vector<std::vector<cv::Point> > contours; | |
int max_area = 0; | |
std::vector<cv::Point> large_contour; | |
std::vector<cv::Point> convex_hull; | |
// convert to grayscale | |
cv::cvtColor(src_img, gray_img, CV_BGR2GRAY); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = "Deepak.G.R." | |
__credits__ = "Sumod Hajela" | |
__license__ = 'Public Domain' | |
""" | |
usage: | |
Go to command line and type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hypermedia.video.*; // Imports the OpenCV library | |
OpenCV opencv; // Creates a new OpenCV object | |
PImage movementImg; // Creates a new PImage to hold the movement image | |
int poppedBubbles; // Creates a variable to hold the total number of popped bubbles | |
ArrayList bubbles; // Creates an ArrayList to hold the Bubble objects | |
PImage bubblePNG; // Creates a PImage that will hold the image of the bubble | |
PFont font; // Creates a new font object | |
void setup() |
NewerOlder