Updated by Alexander Shishkov almost 11 years ago
Isn't the following code (which can be found at (photo/src/calibrate.cpp) incorrect?
<pre>
int eq = 0;
for(size_t i = 0; i < sample_points.size(); i++) {
for(size_t j = 0; j < images.size(); j++) {
int val = images[j].ptr()[3*(sample_points[i].y * images[j].cols + sample_points[j].x) + channel];
A.at<float>(eq, val) = w.at<float>(val);
A.at<float>(eq, LDR_SIZE + (int)i) = -w.at<float>(val);
B.at<float>(eq, 0) = w.at<float>(val) * log(times.at<float>((int)j));
eq++;
}
}
</pre>
Because sample_points is accessed from the indices "i" (sample_points[i].y) and "j" (sample_points[j].x) at the same time?
Best Regards,
Márcio Macedo
<pre>
int eq = 0;
for(size_t i = 0; i < sample_points.size(); i++) {
for(size_t j = 0; j < images.size(); j++) {
int val = images[j].ptr()[3*(sample_points[i].y * images[j].cols + sample_points[j].x) + channel];
A.at<float>(eq, val) = w.at<float>(val);
A.at<float>(eq, LDR_SIZE + (int)i) = -w.at<float>(val);
B.at<float>(eq, 0) = w.at<float>(val) * log(times.at<float>((int)j));
eq++;
}
}
</pre>
Because sample_points is accessed from the indices "i" (sample_points[i].y) and "j" (sample_points[j].x) at the same time?
Best Regards,
Márcio Macedo