Closed CanadianHusky closed 4 years ago
Upconf1 and leftconf is not an array ... Dim upconf1, leftconf1 As Single
Additionally move the Parameters in the right Order:
_AllFunctions.pixOrientDetect(fpixs, upconf1, leftconf1, 1, Enumerations.DebugOnOff.DebugOff)
Please try and Close this issue
There seems to be some sort of confusion with the wrapper library, or there are other versions floating around.
https://nugetmusthaves.com/Package/LeptonicaSharp the package from this link is version 1.77.0.1. When linked in a Project, it creates the following
with this wrapper _All does not exist in the Leptonica Namespace, but _AllFunctions exists instead
I have now compiled the wrapper from the source using the repo at https://github.com/Phreak87/LeptonicaSharp/ and indeed the behaviour is different Observation: The old library has very detailed (helpful) xml documentation during intellisense. The new one does not.
I converted the 2 parameters to single data type and adjusted the parameter order the way the wrapper requires them. The test project does not compile without those correct data types anyways.
Now I am able to execute the code correctly and some non-zero values for upconf1, leftconf1 are returned without an error.
However a new problem arises - the expected result is not happening.
```
Dim pix1 As New Pix("c:\temp\cimg_BR-90.png")
Dim fpixs As Pix = _All.pixConvertTo1(pix1, 130)
Dim upconf1, leftconf1 As Single
Dim pix2 As Pix = _All.pixOrientCorrect(fpixs, 0, 0, upconf1, leftconf1, 0)
pix2.Display()
'cleanup
pix1.Dispose()
pix2.Dispose()
There are no debugger or code errors anymore, however this test image is not rotated correctly as expected
Is there anything that can be done about that ? Thank you for the prompt response. The amount of work in the wrapper is impressive. Well done.
Thank you,
the function works fine. i think your image have to less usable information to rotate. try it with other pictures (e.g. normal book page) and it will work as expected.
Oh and ... Use the Library you Compiled ... The nuget is not up- to-date
Hello,
The following minimalistic code, inspired from this C++ version (https://stackoverflow.com/a/31906060) crashes at the marked line and I cannot figure out what I am doing wrong. The goal is to do orientation detection as fast as possible Is anyone kind enough to provide an opinion what could be done ? I am using the 64 bit version LeptonicaSharp-master\LIB_LEPT\X64\leptonica-1.77.0.dll and the wrapper seems to load the native DLL fine. Thank you veru much