Closed EscapedGibbon closed 3 months ago
Why the corrected image is inverted in the snapshot ?
This is the image subtractBackground
returns. Should I add an inversion to the function so that it gives an inverted result?
This is the image
subtractBackground
returns. Should I add an inversion to the function so that it gives an inverted result?
This image is expected to return the corrected image or the background ? Based on the name a would expect the corrected image so it should be pretty close to the original image.
This is the image
subtractBackground
returns. Should I add an inversion to the function so that it gives an inverted result?This image is expected to return the corrected image or the background ? Based on the name a would expect the corrected image so it should be pretty close to the original image.
Something like this?
Indeed this looks more like what I expect.
@EscapedGibbon Please could you rename everything to 'correctBackground' because subtract is confusing. In the example you actually add it.
@EscapedGibbon Seems this function is not exposed. Pleaxe expose it as static !
@lpatiny I don't like the use of a fixed value for the default grid size:
@lpatiny I don't like the use of a fixed value for the default grid size:
- It doesn't scale with the image's size
- It makes the method throw by default when the image is small enough
I was thinking that this was a good compromise because we fit by a polynomial of degree 2 (aX^2 + bX + cY^2 + dY + eXY + f) so 6 parameters. It does not make sense to have much more points and it does not make sense I think to try to remove a background of an image that is less that 10x10.
But if you have other idea you may ask Maxim to change it.
https://github.com/image-js/image-js-typescript/issues/275