示例#1
0
scene1, stems, leaves, coords = seg.organs(scene)


"""
from scanalea.light import caribu, display, turtle

caribu_scene, res = caribu(scene, source=turtle(16))
display(scene, res)
"""

leaves_data = '/media/pradal/DONNEES/pradal/data/plantscan/segmented2/leaves_data.csv'
g = seg.create_mtg(stems, leaves,coords, leaves_data=leaves_data)
Viewer.display(Scene(g.property('geometry').values()))

from scanalea.maize import inferMaize
parameters=inferMaize(leaves_data)

rank = parameters['ranks']['rank'] # starting from 1
first_leaf_index = rank[0]
if first_leaf_index > 1:
    s = '%d '%(first_leaf_index-1) + (' leaves ' if first_leaf_index>2 else 'leaf ') + 'missing at the base'
    print s

stage = parameters['stage']
ligulated_leaves = int(np.round(stage['col'])[0]-first_leaf_index)+1
total_leaves = int(np.round(stage['tip'])[0]-first_leaf_index)+1

nb_leaves = g.nb_vertices(scale=3)
print 'Segmented leaves: %d but Predicted leaves: %d'%(nb_leaves, total_leaves)

metamer_ids = sorted(g.vertices(scale=3))
示例#2
0
def test_inferMaize():
    return inferMaize('./leaves_data.csv')