So you say “programs like Trilium”. Have you looked at Joplin?
Joplin comes with OCR albeit for search only. I myself have not tried it yet, but Joplin itself is a great note app.
Also Joplin seems to have an in development plugin for extracting text via OCR.
Maybe you can then export it to Trilium, if this a one time thing.
They get “Ram Ranch” not more, not less.