Targets
You can import icepy4d classes by
import icepy4d.core as icecore
and directly access to the Camera class by
icecore.Targets
icepy4d.core.targets.Targets
Class to store Target information, including image coordinates and object coordinates Targets are stored as numpy arrays
| Attributes: |
|
|---|
__init__(im_file_path=None, obj_file_path=None)
Initialize a new instance of the Targets class.
| Parameters: |
|
|---|
__len__()
Return the total number of features stored.
| Returns: |
|
|---|
append_obj_cord(new_obj_coor)
Append new object coordinates to the current object coordinates.
| Parameters: |
|
|---|
TODO: add checks on input dimensions
get_im_coord(cam_id=None)
Return the image coordinates as a numpy array.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_image_coor_by_label(labels, cam_id)
get_image_coor_by_label Get image coordinates of the targets on the images given a list of target labels
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
get_obj_coord()
Return the object coordinates as a numpy array.
| Returns: |
|
|---|
get_object_coor_by_label(labels)
get_object_coor_by_label Get object coordinates of the targets on the images given a list of target labels
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
get_target_labels(cam_id=None)
Returns target labels as a list.
| Parameters: |
|
|---|
| Returns: |
|
|---|
read_im_coord_from_txt(camera_id, path, delimiter=',', header=0)
Read target image coordinates from a .txt file and store them in a pandas DataFrame organized as follows:
- One line per target
- label, then first x coordinate, then y coordinate
- Coordinates separated by a delimiter (default: ',')
e.g.
# label,x,y
target_1,1000,2000
target_2,2000,3000
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
read_obj_coord_from_txt(path=None, delimiter=',', header=0)
Read target object coordinates from a .txt file and store them in a pandas DataFrame organized as follows:
- One line per target
- label, then first x coordinate, then y coordinate
- Coordinates separated by a delimiter (default: ',')
e.g.
# label,X,Y,Z
target_1,1000,2000,3000
target_1,2000,3000,3000
| Parameters: |
|
|---|
| Raises: |
|
|---|
| Returns: |
|
|---|
reset_targets()
Reset Target instance to empy list and None objects