Show raw values in navigator when demosaic 'none' is used
This commit is contained in:
@@ -160,6 +160,7 @@ public:
|
||||
{
|
||||
return this;
|
||||
}
|
||||
virtual void getRawValues(int x, int y, int &R, int &G, int &B) = 0;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5460,6 +5460,21 @@ void RawImageSource::init ()
|
||||
}
|
||||
}
|
||||
|
||||
void RawImageSource::getRawValues(int x, int y, int &R, int &G, int &B)
|
||||
{
|
||||
int xnew = x + border;
|
||||
int ynew = y + border;
|
||||
int c = FC(ynew,xnew);
|
||||
int val = rawData[ynew][xnew] / scale_mul[c];
|
||||
if(c == 0) {
|
||||
R = val; G = 0; B = 0;
|
||||
} else if(c == 2) {
|
||||
R = 0; G = 0; B = val;
|
||||
} else {
|
||||
R = 0; G = val; B = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void RawImageSource::cleanup ()
|
||||
{
|
||||
delete phaseOneIccCurve;
|
||||
|
||||
@@ -264,6 +264,7 @@ protected:
|
||||
void pixelshift(int winx, int winy, int winw, int winh, const RAWParams::BayerSensor &bayerParams, unsigned int frame, const std::string &model, float rawWpCorrection);
|
||||
void hflip (Imagefloat* im);
|
||||
void vflip (Imagefloat* im);
|
||||
void getRawValues(int x, int y, int &R, int &G, int &B);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -97,6 +97,9 @@ public:
|
||||
}
|
||||
void setCurrentFrame(unsigned int frameNum) {}
|
||||
|
||||
void getRawValues(int x, int y, int &R, int &G, int &B) { R = G = B = 0;}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user