Commit 1207cd13 authored by Alex Leontiev's avatar Alex Leontiev

Minor fixes

Fixed integer vs unsigned integer comparison in .cpp test source and
trailing whitespaces in source code
parent 11fa0651
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define ABSCLIP(val,threshold) MIN(MAX((val),-(threshold)),(threshold)) #define ABSCLIP(val,threshold) MIN(MAX((val),-(threshold)),(threshold))
namespace cv{namespace optim{ namespace cv{namespace optim{
class AddFloatToCharScaled{ class AddFloatToCharScaled{
public: public:
AddFloatToCharScaled(float scale):_scale(scale){} AddFloatToCharScaled(float scale):_scale(scale){}
...@@ -91,7 +91,7 @@ namespace cv{namespace optim{ ...@@ -91,7 +91,7 @@ namespace cv{namespace optim{
float x_new = x_curr[x] + tau*(p_curr[x].y - p_prev[x].y)-tau*s; float x_new = x_curr[x] + tau*(p_curr[x].y - p_prev[x].y)-tau*s;
// X = X2 + theta*(X2 - X) // X = X2 + theta*(X2 - X)
x_curr[x] = x_new + theta*(x_new - x_curr[x]); x_curr[x] = x_new + theta*(x_new - x_curr[x]);
for(x = 1; x < cols; x++ ) for(x = 1; x < cols; x++ )
{ {
......
...@@ -41,7 +41,7 @@ TEST(Optim_denoise_tvl1, regression_basic){ ...@@ -41,7 +41,7 @@ TEST(Optim_denoise_tvl1, regression_basic){
const int obs_num=5; const int obs_num=5;
std::vector<cv::Mat> images(obs_num,cv::Mat()); std::vector<cv::Mat> images(obs_num,cv::Mat());
for(int i=0;i<images.size();i++){ for(int i=0;i<(int)images.size();i++){
make_noisy(img,images[i], 20, 0.02,rng); make_noisy(img,images[i], 20, 0.02,rng);
//make_spotty(images[i],rng); //make_spotty(images[i],rng);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment