move to OnceCell binarizer cache

This commit is contained in:
Henry Schimke
2023-01-05 11:29:29 -06:00
parent 453fc41f3f
commit b375e04160
16 changed files with 129 additions and 131 deletions

View File

@@ -39,7 +39,7 @@ fn getBufferedImage(fileName: &str) -> DynamicImage {
pub(crate) fn getBinaryBitmap(fileName: &str) -> BinaryBitmap {
let bufferedImage = getBufferedImage(fileName);
BinaryBitmap::new(Rc::new(RefCell::new(GlobalHistogramBinarizer::new(
BinaryBitmap::new(Rc::new(GlobalHistogramBinarizer::new(
Box::new(BufferedImageLuminanceSource::new(bufferedImage)),
))))
)))
}