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
[22:27] <@xamox> If you have changes you want to keep, then I suggest formatting a patch | |
[22:27] <@xamox> git checkout develop | |
[22:27] <vighnesh> Okay, So ill reclone, put in my additions, and resend pull request ? | |
[22:28] <@xamox> git format patch develop mypersonal/develop > mychanges.patch | |
[22:28] <@xamox> You can always edit out of that patch file what you want to delete or keep | |
[22:28] <@xamox> then reclone | |
[22:28] <@xamox> then you can | |
[22:28] <@xamox> git apply patch mychanges.patch |
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
└─[$] <git:(Image/cvmat_con)> nosetests tests.py | |
...........................................................................................OpenCV Error: Assertion failed (src.depth() == dst.depth() && src.size == dst.size) in cvCopy, file /home/jay/Downloads/OpenCV-2.4.4/modules/core/src/copy.cpp, line 557 | |
E............................................................................................../home/jay/Git/SimpleCV/SimpleCV/ImageClass.py:12889: RuntimeWarning: invalid value encountered in divide | |
harmonic_mean = detA / traceA | |
..WARNING: stepic library required | |
WARNING: stepic library required | |
.........................../home/jay/Git/SimpleCV/SimpleCV/ImageClass.py:13431: UserWarning: 0 intensity means no blurring | |
warnings.warn("0 intensity means no blurring") | |
.... | |
====================================================================== |
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
######## | |
# This code creates 2 sub-processes: one that continually polls a webcam and labels each resulting image with a timestamp, and another that saves these images to file. The process that saves the images to file doesn't save all the images, but instead listens to the main process for time windows that it should save. This permits one to save only certain time windows (toss images that fall outside this time window) and avoids the capture start up lag that occurs if you simply try to poll the webcam during the time window of interest (this lag can be several tenths of a second!). Converting the images to string then pickling before queueing them was necessary because opencv's iplimage format doesn't like to be put in a queue directly. | |
######## | |
import multiprocessing | |
import cv | |
import cPickle | |
import time | |
queue_to_cam_writer = multiprocessing.Queue() |
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
sudo apt-get install -y wget | |
sudo apt-get install -y git | |
wget https://raw.github.com/jayrambhia/Install-OpenCV/master/Ubuntu/2.4/opencv2_4_5.sh | |
sh opencv_2_4_5.sh | |
sudo apt-get install -y python-scipy ipython ipython-notebook | |
sudo apt-get install -y python-setuptools | |
cd ~ | |
git clone [email protected]:jayrambhia/SimpleCV.git | |
cd SimpleCV | |
sudo python setup.py develop |
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
/var/lib/gems/1.8/gems/nestful-1.0.3/lib/nestful/endpoint.rb:39:in `request': /var/lib/gems/1.8/gems/nestful-1.0.3/lib/nestful/request.rb:99: syntax error, unexpected '.', expecting kEND (SyntaxError) | |
.merge(content_type_headers) | |
^ | |
/var/lib/gems/1.8/gems/nestful-1.0.3/lib/nestful/request.rb:100: syntax error, unexpected '.', expecting kEND | |
.merge(headers) | |
^ | |
from /var/lib/gems/1.8/gems/nestful-1.0.3/lib/nestful/endpoint.rb:23:in `get' | |
from /var/lib/gems/1.8/gems/nestful-1.0.3/lib/nestful.rb:16:in `get' | |
from /var/lib/gems/1.8/gems/HNsearch-1.0/lib/HNsearch/HNsearch_api.rb:16:in `query_items' | |
from /var/lib/gems/1.8/gems/HNsearch-1.0/lib/HNsearch.rb:11:in `items' |
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
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 `pkg-config opencv --cflags ` -I /usr/include/libusb-1.0 | |
OBJS = freenectopencv.o | |
LIBS = `pkg-config opencv --libs` -lfreenect | |
TARGET = kinectopencv | |
$(TARGET):$(OBJS) | |
$(CXX) -o $(TARGET) $(OBJS) $(LIBS) | |
all:$(TARGET) | |
clean: | |
rm -f $(OBJS) $(TARGET) |
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
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 `pkg-config opencv --cflags ` -I /usr/include/libusb-1.0 | |
OBJS = freenectopencvmat.o | |
LIBS = `pkg-config opencv --libs` -lfreenect | |
TARGET = kinectopencv | |
$(TARGET):$(OBJS) | |
$(CXX) -o $(TARGET) $(OBJS) $(LIBS) | |
all:$(TARGET) | |
clean: | |
rm -f $(OBJS) $(TARGET) |
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 numpy as np | |
# Get the numpy array | |
import cv2 | |
img = cv2.imread("Lenna.png") | |
# Get 3 layers | |
layer1 = img[:,:,0] | |
layer2 = img[:,:,1] | |
layer3 = img[:,:,2] |
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
Canny(img_thresh, img_canny, 60, 110); | |
vector< vector<Point> > contours; | |
vector< vector<Point> >hull; | |
vector< vector<int> >hullI; | |
findContours(img_canny, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE); | |
for(i = 0; i < contours.size(); i++) | |
{ |
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
/* | |
* V4L2 video capture example | |
* | |
* This program can be used and distributed without restrictions. | |
* | |
* This program is provided with the V4L2 API | |
* see http://linuxtv.org/docs.php for more information | |
*/ | |
#include <stdio.h> |