Module: houghCircles

Executive Summary

Module reads in a message containing a pointer to an image and writes out the circles that are found in the image by OpenCV’s HoughCricle Transform.

The module PDF Description contains further information on this module’s function, how to run it, as well as testing.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages

Msg Variable Name

Msg Type

Description

opnavCirclesOutMsg

OpNavCirclesMsgPayload

output navigation message for relative position

imageInMsg

CameraImageMsgPayload

camera image input message


class HoughCircles : public SysModel
#include <houghCircles.h>

visual planet tracking with Hough circles

Public Functions

HoughCircles()

The constructor for the HoughCircles module. It also sets some default values at its creation.

~HoughCircles()

This is the destructor

void UpdateState(uint64_t CurrentSimNanos)

This module reads an OpNav image and extracts circle information from its content using OpenCV’s HoughCircle Transform. It performs a greyscale, a bur, and a threshold on the image to facilitate circle-finding.

Parameters:

CurrentSimNanos – The clock time at which the function was called (nanoseconds)

Returns:

void

void Reset(uint64_t CurrentSimNanos)

This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values.

Parameters:

CurrentSimNanos – The clock time at which the function was called (nanoseconds)

Returns:

void

Public Members

std::string filename

Filename for module to read an image directly.

Message<OpNavCirclesMsgPayload> opnavCirclesOutMsg

The name of the OpNavCirclesMsg output message.

ReadFunctor<CameraImageMsgPayload> imageInMsg

The name of the camera output message.

std::string saveDir

The name of the directory to save images.

uint64_t sensorTimeTag

[ns] Current time tag for sensor out

int32_t blurrSize

[px] Size of the blurring box in pixels

int32_t cannyThresh

[px] Canny edge detection Threshold

int32_t voteThresh

[-] Threshold in number of votes to qualify a circle as detected

int32_t houghMinDist

[px] Min distance between 2 detected circles

int32_t houghMinRadius

[-] Min radius of a detected circle

int32_t houghMaxRadius

[-] Max radius of a detected circle

int32_t dpValue

[-] Subscaling of image for circle searching, 1 searches full image

double noiseSF

[-] Scale Factor for noise control

int32_t expectedCircles

[-] Number of expected circles to be found

int32_t saveImages

[-] 1 to save images to file for debugging

BSKLogger bskLogger

&#8212; BSK Logging