scan
plantimager.tasks.scan Link
CalibrationScan Link
Bases: Scan
A task for running a scan, real or virtual, with a calibration path.
Module: romiscan.tasks.scan Colmap poses for subsequent scans. (TODO: see calibration documentation) Default upstream tasks: None
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata
|
DictParameter
|
metadata for the scan |
required |
scanner
|
DictParameter
|
scanner hardware configuration (TODO: see hardware documentation) |
required |
path
|
DictParameter
|
scanner path configuration (TODO: see hardware documentation) |
required |
n_points_line
|
IntParameter
|
Number of shots taken on the orthogonal calibration lines. Defaults to |
required |
offset
|
IntParameter
|
Offset to axis limits, in millimeters. Defaults to |
required |
get_path Link
get_path()
Load the ScanPath
module & get the configuration from the TOML config file.
Source code in plantimager/tasks/scan.py
170 171 172 173 174 |
|
load_scanner Link
load_scanner()
Load the CNC
, Gimbal
& Camera
modules and create a Scanner
instance.
Source code in plantimager/tasks/scan.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
output Link
output()
The output fileset associated to a Scan
task is an 'images' dataset.
Source code in plantimager/tasks/scan.py
166 167 168 |
|
requires Link
requires()
Nothing is required.
Source code in plantimager/tasks/scan.py
162 163 164 |
|
run Link
run()
Run the calibration scan.
Notes
Overrides the method from Scan
.
Source code in plantimager/tasks/scan.py
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
|
HdriFileset Link
Bases: FilesetExists
This task check the existence of a 'hdri'
Fileset.
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required. |
scan_id |
Parameter
|
The id of the scan dataset that should contain the fileset. |
fileset_id |
str
|
The name of the fileset that should exist. |
IntrinsicCalibrationScan Link
Bases: Scan
A task to calibrate the intrinsic parameters of the camera.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_poses
|
IntParameter
|
Number of calibration pattern pictures to take. Defaults to |
required |
offset
|
IntParameter
|
Offset to axis limits, in millimeters. Defaults to |
required |
romi_run_task
|
|
required |
get_path Link
get_path()
Load the ScanPath
module & get the configuration from the TOML config file.
Source code in plantimager/tasks/scan.py
170 171 172 173 174 |
|
load_scanner Link
load_scanner()
Load the CNC
, Gimbal
& Camera
modules and create a Scanner
instance.
Source code in plantimager/tasks/scan.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
output Link
output()
The output fileset associated to a Scan
task is an 'images' dataset.
Source code in plantimager/tasks/scan.py
166 167 168 |
|
requires Link
requires()
Nothing is required.
Source code in plantimager/tasks/scan.py
162 163 164 |
|
ObjFileset Link
Bases: FilesetExists
This task check the existence of a 'data'
Fileset.
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required. |
scan_id |
Parameter
|
The id of the scan dataset that should contain the fileset. |
fileset_id |
str
|
The name of the fileset that should exist. |
PaletteFileset Link
Bases: FilesetExists
This task check the existence of a 'palette'
Fileset.
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required. |
scan_id |
Parameter
|
The id of the scan dataset that should contain the fileset. |
fileset_id |
str
|
The name of the fileset that should exist. |
Scan Link
Bases: RomiTask
A task for running a scan, real or virtual.
Module: romiscan.tasks.scan Default upstream tasks: None
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required by a |
scan_id |
(Parameter, optional)
|
The scan id to use to create the |
metadata |
(DictParameter, optional)
|
Metadata of the scan. Defaults to an empty dictionary. |
scanner |
(DictParameter, optional)
|
Scanner configuration to use for this task. (TODO: see hardware documentation) Defaults to an empty dictionary. |
get_path Link
get_path()
Load the ScanPath
module & get the configuration from the TOML config file.
Source code in plantimager/tasks/scan.py
170 171 172 173 174 |
|
load_scanner Link
load_scanner()
Load the CNC
, Gimbal
& Camera
modules and create a Scanner
instance.
Source code in plantimager/tasks/scan.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
|
output Link
output()
The output fileset associated to a Scan
task is an 'images' dataset.
Source code in plantimager/tasks/scan.py
166 167 168 |
|
requires Link
requires()
Nothing is required.
Source code in plantimager/tasks/scan.py
162 163 164 |
|
run Link
run(path=None, scanner=None, extra_md=None)
Run a scan.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path
|
If |
None
|
scanner
|
Scanner or VirtualScanner
|
If |
None
|
extra_md
|
dict
|
A dictionary of extra metadata to add to the 'images' fileset. |
None
|
Source code in plantimager/tasks/scan.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
ScannerToCenter Link
Bases: RomiTask
A task to move the camera at the center of the path.
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required. |
scan_id |
(Parameter, optional)
|
The scan id to use to get or create the |
SceneFileset Link
Bases: FilesetExists
This task check the existence of a 'scenes'
Fileset.
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required. |
scan_id |
Parameter
|
The id of the scan dataset that should contain the fileset. |
fileset_id |
str
|
The name of the fileset that should exist. |
VirtualScan Link
Bases: Scan
Task to create scans of virtual plants using Blender.
Attributes:
Name | Type | Description |
---|---|---|
upstream_task |
None
|
No upstream task is required by a |
scan_id |
(Parameter, optional)
|
The scan id to use to create the |
metadata |
(DictParameter, optional)
|
Metadata of the scan. Defaults to an empty dictionary. |
scanner |
(DictParameter, optional)
|
VirtualScanner configuration to use for this task. Defaults to an empty dictionary. |
load_scene |
(BoolParameter, optional)
|
Whether to load the scene file.
Defaults to |
scene_file_id |
(Parameter, optional)
|
The name of the scene file to load, if any. Defaults to an empty string. |
use_palette |
(BoolParameter, optional)
|
Whether to use a color palette to rendre the virtual plant.
Defaults to |
use_hdri |
(BoolParameter, optional)
|
Whether to use an HDRI file for the background.
Defaults to |
obj_fileset |
(TaskParameter, optional)
|
The Fileset that contains the virtual plant OBJ file to render and capture.
Defaults to |
hdri_fileset |
(TaskParameter, optional)
|
The Fileset that contains the HDRI files to use as background.
Defaults to |
scene_fileset |
(TaskParameter, optional)
|
The Fileset that contain the scenes to use.
Defaults to |
palette_fileset |
(TaskParameter, optional)
|
The Fileset that contains the color palette to use to render the virtual plant.
Defaults to |
render_ground_truth |
(BoolParameter, optional)
|
If |
colorize |
(bool, optional)
|
Whether the virtual plant should be colorized in Blender.
Defaults to |
get_path Link
get_path()
Load the ScanPath
module & get the configuration from the TOML config file.
Source code in plantimager/tasks/scan.py
170 171 172 173 174 |
|
load_scanner Link
load_scanner()
Create the virtual scanner configuration and defines the files it.
Returns:
Type | Description |
---|---|
VirtualScanner
|
The configured virtual scanner. |
Notes
Overrides the method from Scan
.
Source code in plantimager/tasks/scan.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
|
output Link
output()
The output fileset associated to a Scan
task is an 'images' dataset.
Source code in plantimager/tasks/scan.py
166 167 168 |
|
requires Link
requires()
Defines the VirtualScan
task requirements.
Always require a Fileset
that contains a virtual plant.
It can be an ObjFileset
or the output of the VirtualPlant
task.
If the use of an HDRI is required, check the HdriFileset
exists.
If the use of a color palette is required, check the PaletteFileset
exists.
If the use of a scene is required, check the SceneFileset
exists.
Notes
Overrides the method from Scan
.
Source code in plantimager/tasks/scan.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
|
run Link
run(path=None, scanner=None, extra_md=None)
Run a scan.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path
|
If |
None
|
scanner
|
Scanner or VirtualScanner
|
If |
None
|
extra_md
|
dict
|
A dictionary of extra metadata to add to the 'images' fileset. |
None
|
Source code in plantimager/tasks/scan.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|