Open denizsincar29 opened 1 year ago
Do you know how to use Docker? Perhaps there's an easy way using it.
For sending you can use cimbar_js. The easiest way is to save the cimbar.html
file from here and open it in your local web browser.
For decoding there's unfortunately not (currently) a good way to do this. It might be possible to rig something up with the cimbar
executable using docker (or WSL...), but I haven't done any testing with that approach, and it's likely to feel a bit hack-y regardless.
One eventual goal for this project would be to have a browser-based decoder (just as there's a browser based sender/encoder), but it doesn't exist yet. :no_mouth:
edit: incorrectly wrote cimbar_recv
instead of cimbar
above. The hack that comes to mind is to capture video frames from a native windows app, and pass each saved image -- hopefully stored on ramdisk -- to a dockerized cimbar
running in stdin mode.
i didn't know what is docker untill 2 weeks ago. I was just using docker if there was writen in some instructions. Yes, a browser based decoder would be nice
Yes, a browser based decoder would be nice
Cool. Would you implement it? :)
I am a complete beginner at c++. I do what I can, but in this case I wait for a ready solution :). i know that this is not great, but how will i implement a browser based decoder if i can do only cout hello world...
I am a complete beginner at c++. I do what I can, but in this case I wait for a ready solution :). i know that this is not great, but how will i implement a browser based decoder if i can do only cout hello world...
Ha, don't worry about it. :slightly_smiling_face:
I'll likely implement that myself, though I don't know how soon it'll be.
I've dockerized a snapshot of libcimbar (commit b0aae7802b50c67c64fd3e1092b7e3f88aefa98b) a while back. I did it on the run and had some manual steps, hence didn't feel confident contributing it upstream. If you're very stuck, at least you can try installing Docker and running this:
docker run -it --volume //c/Users/myuser/myfolder:/src mihaigalos/libcimbar
Make sure to adapt the path to mount into docker to the files you want to encode/decode.
Then, inside docker you can type this for help:
cimbar --help
Then just encode a file using:
cimbar --encode -i input.txt -o encoded
And decode using:
cimbar encoded.png -o .
All credits go to @sz3, source attribution is in the docker under /src-libcimbar
.
hmmm it decodes only static images? but how about data transfer? i mean like animated qrcodes. isn't cimbar made for this?
hmmm it decodes only static images? but how about data transfer? i mean like animated qrcodes. isn't cimbar made for this?
The cimbar
executable operates on single or multiple images (it also accepts filenames from stdin, so you can feed it images as they come in). cimbar_recv
is a test executable that operates on video streams, but probably won't work in the docker container.
I would definitely categorize it as a hack, but it should be possible to capture camera frames to a series of images, feed them to a long-lived cimbar
instance (running in docker) over stdin, and do decodes that way. I'm not sure if that's worth the trouble or not!
Hello! why we can't just compile cimbar on windows?
Hello! why we can't just compile cimbar on windows?
It's not tested/currently supported, so some work will be necessary to get it to compile/run. But you (or anyone else) is welcome to try it if you want!
I'd guess mingw is probably a safer bet than the MS compiler.
Ok, so I've come up with something that seemed to work for me (with animated barcodes).
First, cimbar --encode <file> -o <prefix>
. // Encodes
Second, convert <prefix>_*.png <gifname>.gif
// Converts encoded file sequence into animated gif
Third, cimbar_recv -i <gifname>.gif -o .
and press Ctrl-C when it says its failing to read from camera (It's written the file already)
Fourth, rename the resulting file to whatever you want.
Disclaimer: I am on Linux, so I don't know if it works on windows, but with docker seems like it might work.
Also, for compiling for windows, maybe try cygwin?
Hello. Are there any bindings or utilities to make the encoder and decoder on windows? I am completely inexperienced in c++ and would love to try this awesome library out. Thank you.