Refractor loading FITS so it can load RGB images

This commit is contained in:
2021-03-25 16:14:28 +01:00
parent dcb47f51a0
commit d235b18e86
3 changed files with 45 additions and 84 deletions
+6 -11
View File
@@ -55,6 +55,11 @@ RawImage::RawImage(int w, int h, ImgType type)
m_img.create(h, w, Type2CV(type));
}
RawImage::RawImage(cv::Mat &img)
{
m_img = img;
}
RawImage::RawImage(const RawImage &d)
{
d.m_img.copyTo(m_img);
@@ -161,17 +166,7 @@ uint32_t RawImage::size() const
RawImage::ImgType RawImage::type() const
{
switch(m_img.type())
{
case CV_8U:
return UINT8;
case CV_16U:
return UINT16;
case CV_32F:
return FLOAT32;
default:
return UNKNOWN;
}
return CV2Type(m_img.type());
}
void* RawImage::data()