Skip to content

Instantly share code, notes, and snippets.

└─[$] <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")
....
======================================================================
@jayrambhia
jayrambhia / git patches
Created April 22, 2013 17:02
git patches
[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
@jayrambhia
jayrambhia / gist:5423271
Created April 19, 2013 21:11
copying is breaking tests..
└─[$] <git:(Main/referncing_issues*)> nosetests tests.py
.........FF............OpenCV Error: Assertion failed (A.size == arrays[i0]->size) in init, file /home/jay/Downloads/OpenCV-2.4.4/modules/core/src/matrix.cpp, line 3180
E.....................................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..........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..................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.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.........OpenCV Error: Assertio
@jayrambhia
jayrambhia / FaceRecognize_update,py
Created April 16, 2013 22:52
Update utility for FaceRecognize Moudle in SimpleCV.
def update(self, images=None, labels=None, csvfile=None, delimiter=";"):
"""
**SUMMARY**
Update the training set of the face recognizer.
**PARAMETERS**
* *images* - A list of Images or ImageSet. All the images must be of
same size.
<marandi> hi guys , im from Iran , can i participate in gsoc ?
* Czarconius ([email protected]) has joined #gsoc
* SeySayux has quit (Ping timeout: 264 seconds)
* Aceeeed ([email protected]) has joined #gsoc
<nurupo> marandi: seems like you are not allowed to http://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2013/help_page#4._Who_is_not_eligible_to_participate_as
* warunsl ([email protected]) has joined #gsoc
<nurupo> or, better say, you are ineligible
* haseeb (~haseeb@unaffiliated/haseeb) has joined #gsoc
* dhruvasagar ([email protected]) has joined #gsoc
<marandi> nurupo: its so unfair :( !
libv4l2: error setting pixformat: Device or resource busy
HIGHGUI ERROR: libv4l unable to ioctl S_FMT
libv4l2: error setting pixformat: Device or resource busy
libv4l1: error setting pixformat: Device or resource busy
HIGHGUI ERROR: libv4l unable to ioctl VIDIOCSPICT
*** glibc detected *** /usr/bin/python: double free or corruption (fasttop): 0x0000000003724b80 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f0ecac5eb96]
/usr/local/lib/libopencv_highgui.so.2.4(_ZN20CvCaptureCAM_V4L_CPP4openEi+0x6b5)[0x7f0eb4b1e4c5]
class foo:
def __init__(self):
self.a = "abc"
def defB(self):
self.b = "B"
def printB(self):
print self.b
@jayrambhia
jayrambhia / AndroidMainfest.xml
Created March 28, 2013 19:00
First Android OpenCV Application.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.imgloader"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
@jayrambhia
jayrambhia / pyDict.py
Created February 16, 2013 09:01
Python based dictionary. Fetched data from meriem-webster dictionary website,
from BeautifulSoup import BeautifulSoup
import urllib2
import sys
proxy = urllib2.ProxyHandler() # Your proxy here.
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)
def getPrintUnicode(soup):
body=''
@jayrambhia
jayrambhia / getKunisPics.py
Created February 8, 2013 23:32
Fetches Mila Kunis pics from http://reddit.com/r/milakunis | Doesn't use Reddit API. I'll work on that later. Wanted to download few pics fast. Made it up . Downloaded 28 pics and got restricted by reddit. I'll also add header later.
from BeautifulSoup import BeautifulSoup
import urllib2
import os
import re
def getLinks(URL, pics=[]):
print len(pics), "pics yet."
print "fetching", URL
try:
page = urllib2.urlopen(URL)