payloadcomputerdroneprojekt.test.image_analysis package#

Submodules#

payloadcomputerdroneprojekt.test.image_analysis.helper module#

class payloadcomputerdroneprojekt.test.image_analysis.helper.TestCamera(config)[source]#

Bases: AbstractCamera

get_current_frame()[source]#

Capture the current frame from the camera. :return: The captured frame.

start_camera(config=None)[source]#

Start the camera with the given configuration. :param config: Optional configuration for the camera.

stop_camera()[source]#

Stop the camera.

class payloadcomputerdroneprojekt.test.image_analysis.helper.TestCommunications(address)[source]#

Bases: Communications

connect()[source]#

Establish a connection to the drone and set telemetry data rates.

Returns:

True if connection is established, False otherwise.

Return type:

bool

This method initializes the MAVSDK System, connects to the specified address, and waits until the connection is confirmed. It also sets telemetry data rates.

async get_position_lat_lon_alt()[source]#

Get the drone’s global position and attitude.

Returns:

[latitude_deg, longitude_deg, relative_altitude_m, roll, pitch, yaw]

Return type:

list[float]

If GPS is not ready, returns zeros.

async get_relative_height()[source]#

Get the drone’s height above the ground.

Returns:

Relative altitude in meters.

Return type:

float

payloadcomputerdroneprojekt.test.image_analysis.test_code module#

class payloadcomputerdroneprojekt.test.image_analysis.test_code.TestCode(methodName='runTest')[source]#

Bases: TestCase

test_compute_image()[source]#
test_compute_image_2()[source]#
test_compute_image_3()[source]#
test_compute_image_code()[source]#
test_find_orient_1()[source]#

payloadcomputerdroneprojekt.test.image_analysis.test_code2 module#

class payloadcomputerdroneprojekt.test.image_analysis.test_code2.TestCode2(methodName='runTest')[source]#

Bases: TestCase

test_compute_image_3()[source]#
payloadcomputerdroneprojekt.test.image_analysis.test_code2.calc_offset(ia: ImageAnalysis, image_pos, image, height)[source]#

payloadcomputerdroneprojekt.test.image_analysis.test_color module#

class payloadcomputerdroneprojekt.test.image_analysis.test_color.TestImage(methodName='runTest')[source]#

Bases: TestCase

test_compute_image()[source]#

payloadcomputerdroneprojekt.test.image_analysis.test_image module#

class payloadcomputerdroneprojekt.test.image_analysis.test_image.TestImage(methodName='runTest')[source]#

Bases: TestCase

test_color()[source]#

Tests if the function gets correct color

test_compute_image()[source]#
test_fps()[source]#

Tests if the function could achive the realistic computation time

test_image_loop()[source]#
test_object_detection()[source]#

Tests if the function detects correct objects

test_object_position()[source]#

Tests if the function calculates the correct position of the object

test_quality_image()[source]#

Tests if the function detects the usability of image correctly

test_start_camera()[source]#

payloadcomputerdroneprojekt.test.image_analysis.test_pixel_calc module#

class payloadcomputerdroneprojekt.test.image_analysis.test_pixel_calc.TestImage(methodName='runTest')[source]#

Bases: TestCase

test_local_coords_0_0()[source]#
test_local_coords_image_1()[source]#
test_local_coords_image_10()[source]#
test_local_coords_image_11()[source]#
test_local_coords_image_12()[source]#
test_local_coords_image_13()[source]#
test_local_coords_image_14()[source]#
test_local_coords_image_2()[source]#
test_local_coords_image_3()[source]#
test_local_coords_image_4()[source]#
test_local_coords_image_5()[source]#
test_local_coords_image_6()[source]#
test_local_coords_image_7()[source]#
test_local_coords_image_8()[source]#
test_local_coords_image_9()[source]#
test_local_coords_pitch_angle()[source]#
test_local_coords_pos_x_negative()[source]#
test_local_coords_pos_x_off_pos()[source]#
test_local_coords_pos_x_positive()[source]#
test_local_coords_pos_y_negative()[source]#
test_local_coords_pos_y_positive()[source]#
test_local_coords_roll_angle()[source]#
test_offset()[source]#
test_offset_reduced_height()[source]#

Module contents#