Skip to content
Snippets Groups Projects
Commit 460c75e4 authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Scene is now a member of database and doc has been formatted for it

parent 3a0cf7f1
No related branches found
No related tags found
No related merge requests found
Showing
with 54 additions and 60 deletions
No preview for this file type
import matplotlib.pyplot as plt
from navipy.database import DataBaseLoad
import navipy.processing as processing
import os
import pkg_resources
# 1) Connect to the database
mydb_filename = os.path.abspath('../database.db')
mydb_filename = pkg_resources.resource_filename(
'navipy', 'resources/database.db')
mydb = DataBaseLoad(mydb_filename)
# 2) Define the position-orinetation at which
# we want the image
rowid = 12
my_scene = processing.scene(mydb, rowid=rowid)
my_skyline = processing.skyline(my_scene)
my_scene = mydb.scene(rowid=rowid)
my_skyline = processing.pcode.skyline(my_scene)
f, axarr = plt.subplots(1, 2, figsize=(15, 4))
for chan_i, chan_n in enumerate(mydb.channels):
......
......@@ -46,6 +46,8 @@
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#O"><strong>O</strong></a>
......@@ -65,6 +67,26 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="processing.html#navipy.processing.pcode.contrast_weighted_nearness">contrast_weighted_nearness() (in module navipy.processing.pcode)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="database.html#navipy.database.DataBaseLoad.create">create (navipy.database.DataBaseLoad attribute)</a>
</li>
</ul></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="database.html#navipy.database.DataBaseLoad">DataBaseLoad (class in navipy.database)</a>
</li>
</ul></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="database.html#navipy.database.DataBaseLoad.iter_posorients">iter_posorients() (navipy.database.DataBaseLoad method)</a>
</li>
</ul></td>
</tr></table>
......@@ -101,6 +123,10 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="processing.html#navipy.processing.pcode.pcv">pcv() (in module navipy.processing.pcode)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="database.html#navipy.database.DataBaseLoad.posorients">posorients (navipy.database.DataBaseLoad attribute)</a>
</li>
</ul></td>
</tr></table>
......@@ -108,7 +134,7 @@
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="processing.html#navipy.processing.pcode.scene">scene() (in module navipy.processing.pcode)</a>
<li><a href="database.html#navipy.database.DataBaseLoad.scene">scene() (navipy.database.DataBaseLoad method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
......
No preview for this file type
......@@ -83,41 +83,6 @@ In that case the scene is a 3d numpy array
Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
<div class="section" id="place-code">
<h2>Place code<a class="headerlink" href="#place-code" title="Permalink to this headline"></a></h2>
<div class="section" id="scene">
<h3>Scene<a class="headerlink" href="#scene" title="Permalink to this headline"></a></h3>
<dl class="function">
<dt id="navipy.processing.pcode.scene">
<code class="descclassname">navipy.processing.pcode.</code><code class="descname">scene</code><span class="sig-paren">(</span><em>database</em>, <em>posorient=None</em>, <em>rowid=None</em><span class="sig-paren">)</span><a class="headerlink" href="#navipy.processing.pcode.scene" title="Permalink to this definition"></a></dt>
<dd><p>Return a scene at a position orientation or given rowid in a given database.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>database</strong> – a DataBaseLoad class :param posorient: a pandas Series with index: [‘x’,’y’,’z’,’alpha_0,’alpha_1,’alpha_2’] (default None, i.e. not used)</li>
<li><strong>rowid</strong> – a row identification integer for directly reading in the database (default None, i.e. not used).</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a scene [elevation, azimuth, channel, 1] or [ommatidia,channel,1].</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">np.ndarray</p>
</td>
</tr>
</tbody>
</table>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">mydb</span><span class="p">,</span> <span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
</pre></div>
</div>
<p>(<a class="reference external" href="./example/processing/scene.py">Source code</a>, <a class="reference external" href="./example/processing/scene.png">png</a>, <a class="reference external" href="./example/processing/scene.hires.png">hires.png</a>, <a class="reference external" href="./example/processing/scene.pdf">pdf</a>)</p>
<div class="figure">
<img alt="_images/scene.png" src="_images/scene.png" />
</div>
</dd></dl>
</div>
<div class="section" id="skyline">
<h3>Skyline<a class="headerlink" href="#skyline" title="Permalink to this headline"></a></h3>
<dl class="function">
......@@ -127,9 +92,9 @@ Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
:param scene: the scenery at a given location (a 4d numpy array)
:returns: the skyline [1,azimuth,channel,1]
:rtype: np.ndarray</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">mydb</span><span class="p">,</span> <span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_skyline</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">skyline</span><span class="p">(</span><span class="n">my_scene</span><span class="p">)</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># we want the image</span>
<span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">mydb</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
</pre></div>
</div>
<p>(<a class="reference external" href="./example/processing/skyline.py">Source code</a>, <a class="reference external" href="./example/processing/skyline.png">png</a>, <a class="reference external" href="./example/processing/skyline.hires.png">hires.png</a>, <a class="reference external" href="./example/processing/skyline.pdf">pdf</a>)</p>
......@@ -166,9 +131,9 @@ Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
</tr>
</tbody>
</table>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">mydb</span><span class="p">,</span> <span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_contrast</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">michelson_contrast</span><span class="p">(</span><span class="n">my_scene</span><span class="p">)</span>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># we want the image</span>
<span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">mydb</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
</pre></div>
</div>
<p>(<a class="reference external" href="./example/processing/michelson_contrast.py">Source code</a>, <a class="reference external" href="./example/processing/michelson_contrast.png">png</a>, <a class="reference external" href="./example/processing/michelson_contrast.hires.png">hires.png</a>, <a class="reference external" href="./example/processing/michelson_contrast.pdf">pdf</a>)</p>
......@@ -198,7 +163,7 @@ Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
</tbody>
</table>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">mydb</span><span class="p">,</span> <span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">mydb</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_contrast</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">contrast_weighted_nearness</span><span class="p">(</span><span class="n">my_scene</span><span class="p">)</span>
</pre></div>
</div>
......@@ -234,7 +199,7 @@ Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
</tbody>
</table>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">mydb</span><span class="p">,</span> <span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">mydb</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_pcv</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">pcv</span><span class="p">(</span><span class="n">my_scene</span><span class="p">,</span> <span class="n">mydb</span><span class="o">.</span><span class="n">viewing_directions</span><span class="p">)</span>
</pre></div>
</div>
......@@ -267,7 +232,7 @@ Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
</tbody>
</table>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">rowid</span> <span class="o">=</span> <span class="mi">12</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">mydb</span><span class="p">,</span> <span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_scene</span> <span class="o">=</span> <span class="n">mydb</span><span class="o">.</span><span class="n">scene</span><span class="p">(</span><span class="n">rowid</span><span class="o">=</span><span class="n">rowid</span><span class="p">)</span>
<span class="n">my_apcv</span> <span class="o">=</span> <span class="n">processing</span><span class="o">.</span><span class="n">pcode</span><span class="o">.</span><span class="n">apcv</span><span class="p">(</span><span class="n">my_scene</span><span class="p">,</span> <span class="n">mydb</span><span class="o">.</span><span class="n">viewing_directions</span><span class="p">)</span>
</pre></div>
</div>
......@@ -303,7 +268,6 @@ Therefore ibs and obs have 4 and 3 dimension, respectively.</p>
<ul>
<li><a class="reference internal" href="#">Processing a scene</a><ul>
<li><a class="reference internal" href="#place-code">Place code</a><ul>
<li><a class="reference internal" href="#scene">Scene</a></li>
<li><a class="reference internal" href="#skyline">Skyline</a></li>
<li><a class="reference internal" href="#michelson-contrast">Michelson-contrast</a></li>
<li><a class="reference internal" href="#contrast-weighted-nearness">Contrast-weighted-nearness</a></li>
......
Search.setIndex({docnames:["analysing","comparing","computing","database","gettingstarted","index","moving","processing","rendering"],envversion:53,filenames:["analysing.rst","comparing.rst","computing.rst","database.rst","gettingstarted.rst","index.rst","moving.rst","processing.rst","rendering.rst"],objects:{"navipy.processing.mcode":{optic_flow:[7,1,1,""]},"navipy.processing.pcode":{apcv:[7,1,1,""],contrast_weighted_nearness:[7,1,1,""],michelson_contrast:[7,1,1,""],pcv:[7,1,1,""],scene:[7,1,1,""],skyline:[7,1,1,""]},navipy:{database:[3,0,0,"-"],processing:[7,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"case":[3,7],"class":7,"default":7,"final":8,"import":[3,8],"return":[3,7],IBS:7,NOT:[],OBS:7,The:[3,7],With:8,__file__:8,about:1,abspath:[],abus:7,access:3,activ:8,activate_thi:8,activate_virtualenv:8,all:8,along:7,alpha1:8,alpha2:8,alpha3:8,alpha_0:[3,7],alpha_1:[3,7,8],alpha_2:[3,7,8],alpha_3:8,alreadi:3,alwai:7,analys:5,apcv:7,around:7,arrai:[7,8],astyp:[],axarr:[],azimuth:7,background:8,base:7,basten:7,bee:3,bee_samp:8,bee_sampl:8,been:3,beesampl:8,bin:8,blend:8,calcul:[3,7],can:[3,7,8],care:[],cartesian:7,certain:3,channel:[3,7],classic:7,code:3,come:8,compar:5,compon:7,compress:8,comput:5,configur:8,connect:[],consist:3,constant:3,constrast:7,contain:3,contrast_s:7,contrast_weighted_near:7,coordin:7,correspond:3,cost:3,creat:[],create_sampling_grid:8,databas:[5,7],databaseload:[3,7],def:8,defin:7,demo_test:8,depend:3,deriv:7,describ:3,dict:8,differ:3,dimens:7,direct:7,directli:7,disposit:8,distanc:[7,8],distance_channel:7,e402:8,each:[3,7],either:7,elev:7,els:8,entir:3,env:8,environment_nam:8,equal:8,equirectangular:7,ever:3,exampl:[],exec:8,expandus:8,extens:7,eye:7,figsiz:[],filepath:8,folder:8,follow:7,from:[3,7,8],full:3,gener:3,get:5,get_posori:3,given:[3,7,8],grid:8,grow:[],has:3,have:7,head:3,here:8,highest:7,hire:[3,7],home:8,howev:3,ibpc:7,ibs:7,identif:7,identifi:3,imag:[6,7,8],implement:[],imshow:[],inde:3,index:[3,5,7],infin:8,insect:7,instal:8,instead:3,integ:7,intens:7,interpol:6,introduc:8,invert_yaxi:[],its:8,join:8,just:8,know:3,line:[],linspac:8,list:[],literalinclud:[],local:7,locat:7,look:3,lowest:7,lumin:7,mai:3,mallot:7,manner:7,map:7,matplotlib:[],max:[],maximum:[7,8],mcode:7,memori:1,mesh:[],method:7,michelson_contrast:7,min:[],minimum:7,modul:[3,5,8],more:3,move:5,my_apcv:7,my_contrast:7,my_pcv:7,my_scen:7,my_skylin:7,mydb:[3,7],mydb_filenam:3,name:8,navig:[3,8],navipi:[7,8],ndarrai:7,need:[7,8],neighbour:6,none:7,noqa:8,normalis:3,now:8,number:[3,7],numpi:[7,8],object:8,obpc:7,obs:7,omatidium:7,ommatidia:7,ommatidium:7,open:8,optic_flow:7,orient:7,orientaiton:3,orinet:[],otherwis:8,our:8,own:8,page:5,panda:7,panoram:7,param:7,paramet:7,part:7,path:8,pcode:7,pcv:7,pdf:[3,7],pixel:7,place_cod:7,plot:[],plt:[],png:[3,7],point:[],posit:7,position_orient:3,posori:[3,7],process:[3,5],project:7,provid:3,pyplot:[],python:8,quickli:[],rang:3,read:[7,8],read_imag:3,region:7,regular:7,render:[3,5],repres:7,respect:7,row:[3,7],rowid:[3,7],rtype:7,scene:5,sceneri:7,search:5,sens:7,seri:[3,7],show:[],sinc:8,situat:3,size:7,sourc:[3,7],space:7,speak:3,speed:3,sqrt:8,start:5,strategi:3,subplot:[],tabl:3,talk:1,technic:3,tell:8,tempfil:8,temporarydirectori:8,terminolog:7,therefor:7,thi:3,three:[],through:3,thu:[3,7,8],time:3,to_plot_dist:[],to_plot_im:[],toolbox:[7,8],transform:7,type:7,uint8:[],uniqu:3,until:8,use:[3,8],used:[3,7,8],useful:3,variabl:8,veloc:7,view:7,viewing_direct:7,virtualenv:8,want:8,were:3,what:8,wheight:7,when:7,where:[3,8],which:3,workon_hom:8,world_dim:8,zero:8},titles:["Analysing","Comparing","Computing","Database","Getting started","Welcome to Navigation Toolbox\u2019s documentation!","Moving","Processing a scene","Rendering"],titleterms:{agent:0,all:3,analys:0,area:0,around:0,attractor:0,averag:[2,7],between:6,blender:8,build:8,catchment:0,code:[2,7],compar:1,comput:2,contrast:7,cyberbe:8,databas:[3,8],differ:[1,2],document:5,doe:0,environ:8,familiar:[1,2],few:0,find:0,flow:7,from:2,gener:8,get:4,goal:0,grid:6,home:0,how:[3,8],idf:1,imag:[1,2,3],indic:5,infomax:1,load:3,michelson:7,motion:7,move:6,navig:5,nearness:7,network:[1,2],optic:7,orient:3,place:[2,7],point:6,posit:3,process:7,regular:8,render:8,ridf:1,rotat:[1,2],sampl:8,scene:7,script:8,skylin:7,start:4,tabl:5,test:8,toolbox:5,type:0,using:8,vector:[2,7],weight:7,welcom:5,your:8}})
\ No newline at end of file
Search.setIndex({docnames:["analysing","comparing","computing","database","gettingstarted","index","moving","processing","rendering"],envversion:53,filenames:["analysing.rst","comparing.rst","computing.rst","database.rst","gettingstarted.rst","index.rst","moving.rst","processing.rst","rendering.rst"],objects:{"navipy.database":{DataBaseLoad:[3,1,1,""]},"navipy.database.DataBaseLoad":{create:[3,2,1,""],iter_posorients:[3,3,1,""],posorients:[3,2,1,""],scene:[3,3,1,""]},"navipy.processing.mcode":{optic_flow:[7,4,1,""]},"navipy.processing.pcode":{apcv:[7,4,1,""],contrast_weighted_nearness:[7,4,1,""],michelson_contrast:[7,4,1,""],pcv:[7,4,1,""],skyline:[7,4,1,""]},navipy:{database:[3,0,0,"-"],processing:[7,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method","4":"py:function"},terms:{"case":[3,7],"class":3,"default":3,"final":8,"import":[3,8],"return":[3,7],IBS:7,NOT:[],OBS:7,The:[3,7],With:8,__file__:8,about:1,abspath:[],abus:7,access:3,activ:8,activate_thi:8,activate_virtualenv:8,all:8,along:7,alpha1:8,alpha2:8,alpha3:8,alpha_0:3,alpha_1:[3,8],alpha_2:[3,8],alpha_3:8,alreadi:3,alter:3,alwai:7,analys:5,apcv:7,around:7,arrai:[7,8],astyp:[],axarr:[],azimuth:[3,7],background:8,base:[3,7],basten:7,becaus:3,bee:3,bee_samp:8,bee_sampl:8,been:3,beesampl:8,bin:8,blend:8,calcul:[3,7],can:[3,7,8],care:[],cartesian:7,certain:3,channel:[3,7],classic:7,code:3,come:8,compar:5,compon:7,compress:8,comput:5,configur:8,connect:[],consist:3,constant:3,constrast:7,contain:3,contrast_s:7,contrast_weighted_near:7,coordin:7,correspond:3,cost:3,creat:3,create_sampling_grid:8,databas:5,databaseload:3,decid:3,def:8,defin:7,demo_test:8,depend:3,deriv:7,describ:3,dict:8,differ:3,dimens:7,direct:7,directli:3,disposit:8,distanc:[7,8],distance_channel:7,e402:8,each:[3,7],either:7,elev:[3,7],els:8,entir:3,env:8,environment_nam:8,equal:8,equirectangular:7,ever:3,exampl:[],exec:8,expandus:8,extens:7,eye:7,fals:3,figsiz:[],filenam:3,filepath:8,folder:8,follow:7,from:[3,7,8],full:3,gener:3,get:5,get_posori:3,given:[3,7,8],grid:8,grow:[],has:3,have:7,head:3,here:8,highest:7,hire:[3,7],home:8,howev:3,ibpc:7,ibs:7,identif:3,identifi:3,imag:[6,7,8],implement:[],imshow:[],inde:3,index:[3,5,7],infin:8,insect:7,instal:8,instead:3,integ:3,intens:7,interpol:6,introduc:8,invert_yaxi:[],iter:3,iter_posori:3,its:8,join:8,just:8,know:3,line:[],linspac:8,list:[],literalinclud:[],local:7,locat:7,look:3,lowest:7,lumin:7,mai:3,mallot:7,manner:7,map:7,matplotlib:[],max:[],maximum:[7,8],mcode:7,member:[],memori:1,mesh:[],method:7,michelson_contrast:7,min:[],minimum:7,modul:[3,5,8],more:3,move:5,my_apcv:7,my_contrast:7,my_pcv:7,my_scen:[3,7],my_skylin:[],mydb:[3,7],mydb_filenam:3,name:8,navig:[3,8],navipi:[3,7,8],ndarrai:[3,7],need:[7,8],neighbour:6,none:3,noqa:8,normalis:3,now:8,number:[3,7],numpi:[7,8],object:8,obpc:7,obs:7,omatidium:7,ommatidia:[3,7],ommatidium:7,open:8,optic_flow:7,orient:[],orientaiton:3,orinet:[],otherwis:8,our:8,own:8,page:5,panda:3,panoram:7,param:[3,7],paramet:[3,7],part:7,path:8,pcode:7,pcv:7,pdf:[3,7],pixel:7,place_cod:7,plot:[],plt:[],png:[3,7],point:3,posit:[],position_orient:3,posori:3,process:[3,5],project:7,provid:3,pyplot:[],python:8,quickli:[],rang:3,read:[3,8],read_imag:3,region:7,regular:7,render:[3,5],repres:7,respect:7,row:3,rowid:[3,7],rtype:7,scene:[3,5],sceneri:7,search:5,sens:7,seri:3,show:[],sinc:8,situat:3,size:7,sourc:[3,7],space:7,speak:3,speed:3,sqlite3:3,sqrt:8,start:5,strategi:3,subplot:[],tabl:3,talk:1,technic:3,tell:8,tempfil:8,temporarydirectori:8,terminolog:7,therefor:7,thi:3,three:[],through:3,thu:[3,7,8],time:3,to_plot_dist:[],to_plot_im:[],toolbox:[7,8],transform:7,type:[3,7],uint8:[],uniqu:3,until:8,use:[3,8],used:[3,7,8],useful:3,variabl:8,veloc:7,view:7,viewing_direct:7,virtualenv:8,want:[3,7,8],weather:3,were:3,what:8,wheight:7,when:7,where:[3,8],which:3,workon_hom:8,world_dim:8,write:3,zero:8},titles:["Analysing","Comparing","Computing","Database","Getting started","Welcome to Navigation Toolbox\u2019s documentation!","Moving","Processing a scene","Rendering"],titleterms:{agent:0,all:3,analys:0,area:0,around:0,attractor:0,averag:[2,7],between:6,blender:8,build:8,catchment:0,code:[2,7],compar:1,comput:2,contrast:7,cyberbe:8,databas:[3,8],differ:[1,2],document:5,doe:0,environ:8,familiar:[1,2],few:0,find:0,flow:7,from:2,gener:8,get:4,goal:0,grid:6,home:0,how:[3,8],idf:1,imag:[1,2,3],indic:5,infomax:1,load:3,michelson:7,motion:7,move:6,navig:5,nearness:7,network:[1,2],optic:7,orient:3,place:[2,7],point:6,posit:3,process:7,regular:8,render:8,ridf:1,rotat:[1,2],sampl:8,scene:7,script:8,skylin:7,start:4,tabl:5,test:8,toolbox:5,type:0,using:8,vector:[2,7],weight:7,welcom:5,your:8}})
\ No newline at end of file
No preview for this file type
doc/build/plot_directive/example/processing/contrast_weighted_nearness.hires.png

338 KiB | W: | H:

doc/build/plot_directive/example/processing/contrast_weighted_nearness.hires.png

338 KiB | W: | H:

doc/build/plot_directive/example/processing/contrast_weighted_nearness.hires.png
doc/build/plot_directive/example/processing/contrast_weighted_nearness.hires.png
doc/build/plot_directive/example/processing/contrast_weighted_nearness.hires.png
doc/build/plot_directive/example/processing/contrast_weighted_nearness.hires.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
doc/build/plot_directive/example/processing/contrast_weighted_nearness.png

221 KiB | W: | H:

doc/build/plot_directive/example/processing/contrast_weighted_nearness.png

221 KiB | W: | H:

doc/build/plot_directive/example/processing/contrast_weighted_nearness.png
doc/build/plot_directive/example/processing/contrast_weighted_nearness.png
doc/build/plot_directive/example/processing/contrast_weighted_nearness.png
doc/build/plot_directive/example/processing/contrast_weighted_nearness.png
  • 2-up
  • Swipe
  • Onion skin
doc/build/plot_directive/example/processing/michelson_contrast.hires.png

391 KiB | W: | H:

doc/build/plot_directive/example/processing/michelson_contrast.hires.png

391 KiB | W: | H:

doc/build/plot_directive/example/processing/michelson_contrast.hires.png
doc/build/plot_directive/example/processing/michelson_contrast.hires.png
doc/build/plot_directive/example/processing/michelson_contrast.hires.png
doc/build/plot_directive/example/processing/michelson_contrast.hires.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
doc/build/plot_directive/example/processing/michelson_contrast.png

264 KiB | W: | H:

doc/build/plot_directive/example/processing/michelson_contrast.png

264 KiB | W: | H:

doc/build/plot_directive/example/processing/michelson_contrast.png
doc/build/plot_directive/example/processing/michelson_contrast.png
doc/build/plot_directive/example/processing/michelson_contrast.png
doc/build/plot_directive/example/processing/michelson_contrast.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
......@@ -2,3 +2,6 @@ Database
========
.. automodule:: navipy.database
.. autoclass:: navipy.database.DataBaseLoad
:members:
import numpy as np
import matplotlib.pyplot as plt
from navipy.database import DataBaseLoad
import navipy.processing as processing
import pkg_resources
......@@ -12,7 +11,7 @@ mydb = DataBaseLoad(mydb_filename)
# 2) Define the position-orinetation at which
# we want the image and get the scene
rowid = 12
my_scene = processing.pcode.scene(mydb, rowid=rowid)
my_scene = mydb.scene(rowid=rowid)
f, axarr = plt.subplots(1, 2, figsize=(15, 4))
......
......@@ -11,7 +11,7 @@ mydb = DataBaseLoad(mydb_filename)
# 2) Define the position-orinetation at which
# we want the image
rowid = 12
my_scene = processing.pcode.scene(mydb, rowid=rowid)
my_scene = mydb.scene(rowid=rowid)
my_apcv = processing.pcode.apcv(my_scene, mydb.viewing_directions)
my_apcv_sph = processing.tools.cartesian_to_spherical(x=my_apcv[..., 0],
......
......@@ -11,7 +11,7 @@ mydb = DataBaseLoad(mydb_filename)
# 2) Define the position-orinetation at which
# we want the image
rowid = 12
my_scene = processing.pcode.scene(mydb, rowid=rowid)
my_scene = mydb.scene(rowid=rowid)
my_contrast = processing.pcode.contrast_weighted_nearness(my_scene)
f, axarr = plt.subplots(2, 2, figsize=(15, 8))
......
import matplotlib.pyplot as plt
from navipy.database import DataBaseLoad
import navipy.processing as processing
import os
import pkg_resources
# 1) Connect to the database
mydb_filename = os.path.abspath('../database.db')
mydb_filename = pkg_resources.resource_filename(
'navipy', 'resources/database.db')
mydb = DataBaseLoad(mydb_filename)
# 2) Define the position-orinetation at which
# we want the image
rowid = 12
my_scene = processing.scene(mydb, rowid=rowid)
my_contrast = processing.michelson_contrast(my_scene)
my_scene = mydb.scene(rowid=rowid)
my_contrast = processing.pcode.michelson_contrast(my_scene)
f, axarr = plt.subplots(2, 2, figsize=(15, 8))
axarr = axarr.flatten()
......
......@@ -11,5 +11,5 @@ mydb = DataBaseLoad(mydb_filename)
# 2) Define the position-orinetation at which
# we want the image
rowid = 12
my_scene = processing.pcode.scene(mydb, rowid=rowid)
my_scene = mydb.scene(rowid=rowid)
my_pcv = processing.pcode.pcv(my_scene, mydb.viewing_directions)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment