There isn't really an easy option for "sensitivity", because you have to think about what that means in regards to an algorithm that is scanning pixel by pixel trying to determine how much of the document it should cut off. Right now, this is the aggressive cropping algorithm:
1) Go to each side of the page and try to find the a line of white pixels along the entire extent of that side, going from the outward edge inwards. Stop the second you find a line of all white pixels. If none are found, use the line with the highest number of all white pixels
2) Now starting at the lines calculated in #1, work inward and try to find (on each side) a block of "significant" pixels. A pixel is considered significant if it is "dark enough" and each side of it has pixels that are also dark enough (below a certain threshold in terms of their RGB value). Find the block of significant pixels that is the furthest outward (i.e. closest to the beginning lines).
3) Use the four points determined in #2 to define the rectangle of the cropped region.
So what does "sensitivity" mean when you think about the existing algorithm? Does it modify how dark or light the pixels have to be in ordered to be deemed "significant"? Does it require more than just a 3x3 block pixels and instead require 5x5 or 7x7 (where a certain number of those pixels are dark)? It obviously wouldn't make sense to need an entire 5x5 block of pixels to be dark content, as that wouldn't be encountered unless it was a just block of ink on the original document.
If you are aware of existing algorithms for determining crop points accurately and ignoring scan marks near the edges, let me know. I can try making some adjustments to the current algorithm but I don't know if it will address your concerns.
If you are wanting to know why your document was cropped the way it was, it's because the algorithm saw that black line down the side as it was trying to find the cropping point for the top of the document, so it went pretty far down the page before picking the starting point, most likely because the pixels on the side of the page may have been slightly thinner there. So an adjustment I can make is to find the left/right coordinates first, then the top/bottom would only iterate between the left/right calculated positions, which would help in ignoring scan lines on the side.
Mike
UPDATE:
With the adjustment I described, the page you posted is cropped is correctly el-Odysseas (I reproduced what was shown in your screenshot before that). So I will include this change with the next update which may address some of your concerns.
1) Go to each side of the page and try to find the a line of white pixels along the entire extent of that side, going from the outward edge inwards. Stop the second you find a line of all white pixels. If none are found, use the line with the highest number of all white pixels
2) Now starting at the lines calculated in #1, work inward and try to find (on each side) a block of "significant" pixels. A pixel is considered significant if it is "dark enough" and each side of it has pixels that are also dark enough (below a certain threshold in terms of their RGB value). Find the block of significant pixels that is the furthest outward (i.e. closest to the beginning lines).
3) Use the four points determined in #2 to define the rectangle of the cropped region.
So what does "sensitivity" mean when you think about the existing algorithm? Does it modify how dark or light the pixels have to be in ordered to be deemed "significant"? Does it require more than just a 3x3 block pixels and instead require 5x5 or 7x7 (where a certain number of those pixels are dark)? It obviously wouldn't make sense to need an entire 5x5 block of pixels to be dark content, as that wouldn't be encountered unless it was a just block of ink on the original document.
If you are aware of existing algorithms for determining crop points accurately and ignoring scan marks near the edges, let me know. I can try making some adjustments to the current algorithm but I don't know if it will address your concerns.
If you are wanting to know why your document was cropped the way it was, it's because the algorithm saw that black line down the side as it was trying to find the cropping point for the top of the document, so it went pretty far down the page before picking the starting point, most likely because the pixels on the side of the page may have been slightly thinner there. So an adjustment I can make is to find the left/right coordinates first, then the top/bottom would only iterate between the left/right calculated positions, which would help in ignoring scan lines on the side.
Mike
UPDATE:
With the adjustment I described, the page you posted is cropped is correctly el-Odysseas (I reproduced what was shown in your screenshot before that). So I will include this change with the next update which may address some of your concerns.