mirror of
https://github.com/jlengrand/Tippy.git
synced 2026-03-10 08:51:16 +00:00
57 lines
3.8 KiB
HTML
57 lines
3.8 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module tippy.basic_operations</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="tippy.html"><font color="#ffffff">tippy</font></a>.basic_operations</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jlengrand/git/Tippy/tippy/basic_operations.py">/home/jlengrand/git/Tippy/tippy/basic_operations.py</a></font></td></tr></table>
|
|
<p><tt>Contains all basic functions, such as image creation, copy, . . .<br>
|
|
No Image processing complex algorithms here. <br>
|
|
<br>
|
|
Created on Nov 19, 2011<br>
|
|
<br>
|
|
@author: Julien Lengrand-Lambert<br>
|
|
@email: julien@lengrand.fr</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cv.html">cv</a><br>
|
|
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
|
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-create_same_image"><strong>create_same_image</strong></a>(in_img, zero<font color="#909090">=0</font>)</dt><dd><tt>Creates an image of same size, depth and number of channels as input image<br>
|
|
If zero is activated, the image content is set to 0 to avoid parasites.<br>
|
|
<br>
|
|
---<br>
|
|
Ex:<br>
|
|
img = cv.LoadImage("../data/tippy.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)<br>
|
|
copy_img = <a href="#-create_same_image">create_same_image</a>(img, 0)</tt></dd></dl>
|
|
<dl><dt><a name="-mouse_point"><strong>mouse_point</strong></a>(img, name<font color="#909090">='Mouse Points'</font>, mode<font color="#909090">='S'</font>)</dt><dd><tt>Displays input image and waits for user click on a point of the image.<br>
|
|
For each click, the (x, y) coordinates are retrieved.<br>
|
|
<br>
|
|
Two modes are possible:<br>
|
|
-Single : <br>
|
|
The function exits automatically on first click.<br>
|
|
Returns a list containing 1 (x,y) tuple.<br>
|
|
-Multiple :<br>
|
|
All clicks are saved. The function exists when the user types on keyboard<br>
|
|
Returns containing (x,y) tuples.<br>
|
|
---<br>
|
|
Ex:<br>
|
|
img = cv.LoadImage("../data/tippy.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)<br>
|
|
mouse_points(img, name="mouse points", mode="S")</tt></dd></dl>
|
|
</td></tr></table>
|
|
</body></html> |