2014-12-23 15:55:36 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-01-02 03:02:34 -08:00
|
|
|
/* Copyright (c) FIRST 2014-2016. All Rights Reserved. */
|
2014-12-23 15:55:36 -05:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
2014-12-23 15:55:36 -05:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#include "Vision/HSLImage.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new image that uses the Hue, Saturation, and Luminance planes.
|
|
|
|
|
*/
|
2015-06-25 15:07:55 -04:00
|
|
|
HSLImage::HSLImage() : ColorImage(IMAQ_IMAGE_HSL) {}
|
2014-12-23 15:55:36 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new image by loading a file.
|
|
|
|
|
* @param fileName The path of the file to load.
|
|
|
|
|
*/
|
2015-06-25 15:07:55 -04:00
|
|
|
HSLImage::HSLImage(const char *fileName) : ColorImage(IMAQ_IMAGE_HSL) {
|
2015-06-23 04:49:51 -07:00
|
|
|
int success = imaqReadFile(m_imaqImage, fileName, nullptr, nullptr);
|
2015-06-25 15:07:55 -04:00
|
|
|
wpi_setImaqErrorWithContext(success, "Imaq ReadFile error");
|
2014-12-23 15:55:36 -05:00
|
|
|
}
|