[TASK] Finalize canny edge partials.
This commit is contained in:
parent
3194a084e6
commit
998fbe3d2e
|
@ -175,7 +175,8 @@ class CannyEdgeMachine {
|
|||
//
|
||||
// cos(pi/8) -sin(pi/8)
|
||||
// sin(pi/8) cos(pi/8)
|
||||
double octangle = 3.141592/8; // I know ...
|
||||
// TODO: Move these somewhere else!
|
||||
double octangle = M_PI/8;
|
||||
double cosoct = cos(octangle);
|
||||
double sinoct = sin(octangle);
|
||||
double neg_sinoct = -sinoct;
|
||||
|
@ -298,10 +299,14 @@ class CannyEdgeMachine {
|
|||
};
|
||||
|
||||
void doSecondStep(void) {
|
||||
// Reset maximum_magnitude since it will be rebuilt here
|
||||
for(int i=0; i<this->pixels; i++) this->maximum_magnitude[i] = 0;
|
||||
this->filterLocalMaxima(); // uses t_low only
|
||||
};
|
||||
|
||||
void doThirdStep(void) {
|
||||
// Reset binary_edge_pixels since they will be rebuilt here
|
||||
for(int i=0; i<this->pixels; i++) this->binary_edge_pixels[i] = 0;
|
||||
this->workLocalMaxima(); // uses t_low & t_high
|
||||
this->showEdges();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue