[TASK] Switch around black/white for canny edge result.
This commit is contained in:
parent
db28e00f23
commit
6f70f12946
|
@ -261,9 +261,9 @@ class CannyEdgeMachine {
|
|||
for(int y=0; y<this->height; y++) {
|
||||
int pixel = this->binary_edge_pixels[y*this->width + x];
|
||||
if(pixel > 0) {
|
||||
this->working_copy->getImage()->setPixel(x, y, white);
|
||||
} else {
|
||||
this->working_copy->getImage()->setPixel(x, y, black);
|
||||
} else {
|
||||
this->working_copy->getImage()->setPixel(x, y, white);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -271,11 +271,13 @@ class CannyEdgeMachine {
|
|||
|
||||
void work() {
|
||||
this->reset();
|
||||
this->doGaussBlur(this->filter_size);
|
||||
this->doGaussBlur(this->filter_size); // uses filter_size
|
||||
this->doGradiants();
|
||||
this->doGradiantMagnitude();
|
||||
this->filterLocalMaxima();
|
||||
this->workLocalMaxima();
|
||||
// TODO: Checkpoint for 'before t_low changed'
|
||||
this->filterLocalMaxima(); // uses t_low only
|
||||
// TODO: Checkpoint for 'before t_high changed'
|
||||
this->workLocalMaxima(); // uses t_low & t_high
|
||||
this->showEdges();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue