Skip to content

Commit

Permalink
back to gaussian
Browse files Browse the repository at this point in the history
  • Loading branch information
Elucidation committed Feb 27, 2024
1 parent b6756ea commit 56048f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chessboard_detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function processLoadedImage(img) {


// Blur image, then run sobel filters on it.
var box_filter_1d = Filters.getFloat32Array([1/5.,1/5.,1/5.,1/5.,1/5.]);
// var box_filter_1d = Filters.getFloat32Array([1/5.,1/5.,1/5.,1/5.,1/5.]);
// var d = Filters.separableConvolve(Filters.getPixels(internalCanvas), box_filter_1d, box_filter_1d, false);
var d = Filters.filterImage(Filters.gaussianBlur, internalCanvas, 25); // gaussian
d = Filters.sobel(d);
Expand Down Expand Up @@ -147,7 +147,7 @@ function processLoadedImage(img) {
var bbox_width = bbox.tr.x - bbox.tl.x;
var bbox_height = bbox.bl.y - bbox.tl.y;
resultCanvasElement.getContext('2d').drawImage(
Filters.toCanvas(Filters.filterImage(Filters.grayscale,img)),
img,
bbox.tl.x * scale_factor, bbox.tl.y * scale_factor,
bbox_width * scale_factor, bbox_height * scale_factor,
0, 0, 256, 256);
Expand Down

0 comments on commit 56048f9

Please sign in to comment.