6#include <cairo/cairo.h>
14#ifndef CAIRO_HAS_PNG_FUNCTIONS
15#error LOST requires Cairo to be compiled with PNG support
35 std::ostream &
Stream() {
return *stream; };
78 std::vector<std::string>
png;
191 bool shotNoise,
int oversampling,
192 int numFalseStars,
decimal falseMinMagnitude,
decimal falseMaxMagnitude,
197 const Image *
InputImage()
const override {
return centroidsOnly ? nullptr : ℑ };
207 std::vector<unsigned char> imageData;
251 std::unique_ptr<Stars>
stars =
nullptr;
252 std::unique_ptr<StarIdentifiers>
starIds =
nullptr;
303 std::unique_ptr<CentroidAlgorithm> centroidAlgorithm;
306 decimal centroidMinMagnitude = 0;
307 int centroidMinStars = 0;
309 std::unique_ptr<StarIdAlgorithm> starIdAlgorithm;
310 std::unique_ptr<AttitudeEstimationAlgorithm> attitudeEstimationAlgorithm;
311 std::unique_ptr<unsigned char[]> database;
318 const std::vector<PipelineOutput> &actual,
339 const Stars &expectedStars,
const Stars &inputStars);
An attitude estimation algorithm estimates the orientation of the camera based on identified stars.
The attitude (orientation) of a spacecraft.
A full description of a camera. Enough information to reconstruct the camera matrix and then some.
An algorithm that detects the (x,y) coordinates of bright points in an image, called "centroids".
Command line options when using the database command.
int tetraPatternStarsPerFov
long kvectorNumDistanceBins
bool swapDecimalEndianness
decimal kvectorMaxDistance
decimal kvectorMinDistance
bool swapIntegerEndianness
An 8-bit grayscale 2d image.
unsigned char * image
The raw pixel data in the image.
The command line options passed when running a pipeline.
std::string compareStarIds
std::string compareCentroids
bool generateCentroidsOnly
std::string compareAttitudes
int generateNumFalseStars
bool generateRandomAttitudes
decimal attitudeCompareThreshold
decimal generateFalseMaxMag
decimal generateSpreadStdDev
int centroidDummyNumStars
decimal generatePerturbationStddev
decimal generateSaturationPhotons
std::string printActualCentroids
decimal centroidMagFilter
decimal generateCutoffMag
int centroidFilterBrightest
std::string printExpectedAttitude
decimal centroidCompareThreshold
std::string printAttitude
decimal tetraPatternSearchRange
std::string plotCentroidIndices
std::vector< std::string > png
std::string printExpectedCentroids
decimal generateFalseMinMag
std::string tetraPairingMode
std::string printInputCentroids
int estimatedNumFalseStars
decimal generateReadoutTime
decimal tetraPatternMatchTolerance
decimal generateDarkCurrent
decimal generateZeroMagPhotons
decimal generateReadNoiseStdDev
A set of algorithms that describes all or part of the star-tracking "pipeline".
friend Pipeline SetPipeline(const PipelineOptions &values)
Create a pipeline from command line options.
PipelineOutput Go(const PipelineInput &)
Run all stages of a pipeline.
A star idenification algorithm.
~UserSpecifiedOutputStream()
UserSpecifiedOutputStream(std::string filePath, bool isBinary)
Create a PromptedOutputStream which will output to the given file.
std::ostream & Stream()
return the inner output stream, suitable for use with <<
unsigned char * SurfaceToGrayscaleImage(cairo_surface_t *cairoSurface)
Convert a colored Cairo image surface into a row-major array of grayscale pixels.
std::vector< StarIdentifier > StarIdentifiers
const Catalog & CatalogRead()
Read and parse the full catalog from disk. If called multiple times, will re-use the first result.
std::vector< Star > Stars
std::vector< MultiDatabaseEntry > MultiDatabaseDescriptor
StarIdComparison StarIdsCompare(const StarIdentifiers &expected, const StarIdentifiers &actual, const Catalog &expectedCatalog, const Catalog &actualCatalog, decimal centroidThreshold, const Stars &expectedStars, const Stars &inputStars)
Compare expected and actual star identifications.
MultiDatabaseDescriptor GenerateDatabases(const Catalog &catalog, const DatabaseOptions &values)
Appropriately create descriptors for all requested databases according to command-line options.
SerializeContext serFromDbValues(const DatabaseOptions &values)
std::vector< std::unique_ptr< PipelineInput > > PipelineInputList
PipelineInputList GetPipelineInput(const PipelineOptions &values)
Come up with a list of pipeline inputs based on command line options.
void PipelineComparison(const PipelineInputList &expected, const std::vector< PipelineOutput > &actual, const PipelineOptions &values)
Print or otherwise analyze the results of (perhaps multiple) runs of a star tracking pipeline.
Pipeline SetPipeline(const PipelineOptions &values)
Create a pipeline from command line options.
std::ostream & operator<<(std::ostream &output, const Vec2 &vec)
std::vector< CatalogStar > Catalog
cairo_surface_t * GrayscaleImageToSurface(const unsigned char *image, const int width, const int height)
The result of running a pipeline.
Catalog catalog
The catalog that the indices in starIds refer to.
long long centroidingTimeNs
How many nanoseconds the centroiding stage of the pipeline took.
std::unique_ptr< Stars > stars
long long attitudeEstimationTimeNs
std::unique_ptr< Attitude > attitude
std::unique_ptr< StarIdentifiers > starIds
The result of comparing an actual star identification with the true star idenification,...
int numCorrect
The number of centroids in the image which are close to an expected centroid that had an expected ide...
int numTotal
The number of centroids sufficiently close to a true expected star.
int numIncorrect
The number of centroids which were either: