Edge detection block integrated