mirror of
https://github.com/jlengrand/Tippy.git
synced 2026-03-10 08:51:16 +00:00
Works on region growing function.
Tests finshed. Errors on TypeErrors. To be checked in my bed ^^
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
##---
|
||||
# jlengrand
|
||||
#Created on : Thu Oct 27 14:00:20 CEST 2011
|
||||
#
|
||||
# DESCRIPTION :
|
||||
##---
|
||||
|
||||
@@ -5,6 +5,7 @@ No Image processing complex algorithms here.
|
||||
Created on Nov 19, 2011
|
||||
|
||||
@author: Julien Lengrand-Lambert
|
||||
@email: julien@lengrand.fr
|
||||
'''
|
||||
|
||||
import sys
|
||||
@@ -15,7 +16,6 @@ def create_same_image(in_img, zero=0):
|
||||
Creates an image of same size, depth and number of channels as input image
|
||||
If zero is activated, the image content is set to 0 to avoid parasites.
|
||||
|
||||
If creation fails, function returns None.
|
||||
---
|
||||
Ex:
|
||||
img = cv.LoadImage("../data/tippy.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)
|
||||
|
||||
@@ -4,7 +4,7 @@ Contains all functions related to graphical display.
|
||||
Created on Nov 19, 2011
|
||||
|
||||
@author: Julien Lengrand-Lambert
|
||||
|
||||
@email: julien@lengrand.fr
|
||||
'''
|
||||
|
||||
import sys
|
||||
@@ -14,7 +14,7 @@ def display_single_image(img, name="Image", x_pos=0, y_pos=0, delay=0):
|
||||
"""
|
||||
Displays an image on screen.
|
||||
Position can be chosen, and time on screen too.
|
||||
Delay corresponds to the diplay time, in milliseconds.
|
||||
Delay corresponds to the display time, in milliseconds.
|
||||
If delay =0, the Image stays on screen until user interaction.
|
||||
----
|
||||
Ex:
|
||||
@@ -27,7 +27,7 @@ def display_single_image(img, name="Image", x_pos=0, y_pos=0, delay=0):
|
||||
raise TypeError("(%s) Name :String expected!" % (sys._getframe().f_code.co_name))
|
||||
if (not isinstance(x_pos, int)) \
|
||||
or (not isinstance(x_pos, int)) \
|
||||
or (not isinstance(x_pos, int)) : # TODO: find more pythonic way to do that !
|
||||
or (not isinstance(x_pos, int)) :
|
||||
raise TypeError("(%s) Int expected!" % (sys._getframe().f_code.co_name))
|
||||
|
||||
cv.NamedWindow(name)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
##---
|
||||
# jlengrand
|
||||
#Created on : Thu Oct 27 14:00:20 CEST 2011
|
||||
#
|
||||
# DESCRIPTION : This file is only designed to allow access to this folder.
|
||||
##---
|
||||
|
||||
@@ -4,6 +4,7 @@ Contains all tests for basic_operations module
|
||||
Created on Nov 19, 2011
|
||||
|
||||
@author: Julien Lengrand-Lambert
|
||||
@email: julien@lengrand.fr
|
||||
'''
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ Contains all tests for display_operations module
|
||||
Created on Nov 24, 2011
|
||||
|
||||
@author: Julien Lengrand-Lambert
|
||||
@email: julien@lengrand.fr
|
||||
'''
|
||||
import unittest
|
||||
import cv
|
||||
|
||||
Reference in New Issue
Block a user