Skip to content

Instantly share code, notes, and snippets.

//
// RGB to HSV convert sample
//
// see also : http://ja.wikipedia.org/wiki/HSV%E8%89%B2%E7%A9%BA%E9%96%93
//
#include <stdio.h>
#include <math.h>
#define min_f(a, b, c) (fminf(a, fminf(b, c)))
#include <stdio.h>
#include <stdlib.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#if _DEBUG
#pragma comment(lib, "opencv_core248d.lib")
#pragma comment(lib, "opencv_imgproc248d.lib")
#pragma comment(lib, "opencv_highgui248d.lib")
#include <stdio.h>
#include <stddef.h>
typedef struct _hoge {
int a;
char c;
float f;
} Hoge;
int main(int argc, char* argv[])
@yoggy
yoggy / gphoto2_theta_memo.txt
Last active January 2, 2016 13:48
gphoto2でthetaを見てみたテスト(USB接続)
$ LANG=C gphoto2 --summary
Camera summary:
Manufacturer: Ricoh Company, Ltd.
Model: RICOH THETA
Version: 01.10
Serial Number: xxxxxxxx
Vendor Extension ID: 0x6 (1.10)
Capture Formats:
Display Formats: Association/Directory, JPEG, Firmware
@yoggy
yoggy / robot_sample.pde
Created January 6, 2014 09:35
how to use java.awt.Robot class in processing ...
//
// how to use java.awt.Robot class in processing ...
//
import java.awt.*;
import java.awt.event.*;
Robot robot;
PFont pfont;
Point save_p;
@yoggy
yoggy / opencv_test.pde
Last active January 1, 2016 21:29
sample sketch for "OpenCV for Processing" library...
//
// sample sketch for "OpenCV for Processing" library...
//
String image_url = "nike.jpg";
Mat test_img;
void setup() {
size(640, 480);
initOpenCV();
}
String url = "http://example.com/path/to/camera_image.jpg";
void setup() {
size(640, 480);
}
void draw() {
PImage img = loadImage(url);
tint(#aaeeff, 40);
//
// sample sketch for "OpenCV for Processing" library...
//
import gab.opencv.*;
import org.opencv.core.*;
import org.opencv.imgproc.*;
String image_url = "http://example.com/path/to/movie.jpg";
OpenCV opencv;
Mat test_img;
#pragma once
#include <SDKDDKVer.h>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
@yoggy
yoggy / get_my_ipaddress.pde
Created December 3, 2013 12:03
get my global ip address for processing.
void setup() {
String ipaddr = loadStrings("http://checkip.amazonaws.com")[0];
println(ipaddr);
}