feat(magic): suggest OCR on image inputs (Magic)
- Add Magic checks to Optical Character Recognition to detect common image formats via magic bytes - Provide default args (show confidence, LSTM engine) when auto-suggested Authored-by: Izai Alejandro Zalles Merino <zallesrene@gmail.com>
This commit is contained in:
parent
a4f40405ef
commit
de2a83c0a0
@ -46,6 +46,13 @@ class OpticalCharacterRecognition extends Operation {
|
|||||||
defaultIndex: 1
|
defaultIndex: 1
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
this.checks = [
|
||||||
|
{
|
||||||
|
pattern: "^(?:\xff\xd8\xff|\x89\x50\x4e\x47|\x47\x49\x46|.{8}\x57\x45\x42\x50|\x42\x4d)",
|
||||||
|
args: [true, "LSTM only"],
|
||||||
|
useful: true
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user