Snappy compression

Crashes when I load the patch…vvvv.exe-exception-2019-07-19.log (33.1 KB)
I’ll try updating the alpha…

Clean VL install hang on load, so reinstall kinect and opencv this time it opened, to 1 second of depth image, then crash :(
Doesnt load in latest gamma preview, missing some core stuff…

indeed, i see the problem. i’ll get back to you on this…

if you want to visualize the image you can use a Normalize (OpenCV Filter) to get human understandable RGB/BGR from a 16 bit single channel image. You can also use the advanced ConvertTo OpenCV node to change between mat formats altough its easier to mess that one up.

@ravazquez I dont want to look at it, I want to lossless compress the image and send it over a network ;)
KinectDepthToSnappy.vl (40.2 KB)

I got the patch working by dissconnecting the through put to the uncompressor. Tried to get a UDP node in there, but packet size is too big, and I’m lost as always with how to make it work.
In order to look at help patches I opened gamma as my helop viewer, which works, and if your not going to get muliple windows open can I suggest dirty hacking by opening a 2nd instance of gamma for help patches, it really is unworkable looking at help patches and not being able to see what you are looking for help for at the same time, computers are meant to expand the concept of books, not revert to them, and in fact if I had a print manual, I’d still be able to see what I am doing and what the help is! This is one of the things that make VL unpleasent to work in, or certainly learn, if there isnt a dev there to ask…

might be better to use the higher level networking library like NetMQ for this, in 2019 you shouldn’t have to deal with raw sockets anymore:

so the problem with the patch i posted above was caused by the ToImage after the Decompress, which was only there to show a proof of concept. you found it to work as you disconnected that part.

now:
indeed the data is still to much for udp even after the snappy. the attempt you made in your patch (slicing up the data into smaller junks) doesn’t make sense for udp either. you’d not have it guaranteed to get all the junks and even if they all arrive they could be out of order. that is how UDP works.

it would work with TCP, where you’d not have to care about slicing things up. only need to provide a framing that you can then tokenize for on the other end. but TCP in vl is experimental. not sure about its status. so for that i’m afraid you’d have to sort back to beta. tokenizers have help-patches there. the “lengthprefix” one should do.

but indeed, the best option in vl would be using ZMQ.
let us know how you progress…

VL.IO.NetMQ hangs when I try and open the vvvv with the package directory as in the args text
/package-repositories “D:\vvvv\vvvv_50alpha38.2_x64\VL.IO.NetMQ”
And no nuget yet I guess?

indeed i’m afraid no nuget yet.

  • download/checkout in a directory like “D:\vvvv\vl-libs\VL.IO.NetMQ”
  • build the .sln found in \src once with visualstudio
  • run vvvv with commandline: /package-repositories D:\vvvv\vl-libs
    that should do

1>------ Build started: Project: VL.IO.NetMQ, Configuration: Debug Any CPU ------
1>D:\vvvv\vl-libs\VL.IO.NetMQ\src\DummyClass.cs(6,7,6,12): error CS0246: The type or namespace name ‘NetMQ’ could not be found (are you missing a using directive or an assembly reference?)
1>D:\vvvv\vl-libs\VL.IO.NetMQ\src\DummyClass.cs(12,9,12,19): error CS0246: The type or namespace name ‘PushSocket’ could not be found (are you missing a using directive or an assembly reference?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

sounds like the referenced NetMQ nuget is missing. typically visualstudio would just restore that silently on build. not sure why it doesn’t for you. try: rightclick solution in visualstudio solution explorer and run “restore nuget packages”

vvvv.exe-exception-2019-07-27.log (24.8 KB)
Throws an exception ‘The given path’s format is not supported.’

so what is the exact commandline you’re using to run vvvv.exe?

/package-repositories “D:\vvvv\vl-libs” file located as you suggested above

looks legit, not sure what’s going on there.
so i created a nuget for vl.netmq. please try: nuget install vl.netmq -prerelease
hope that works.

For anyone followung this that is nuget install vl.IO.netmq -prerelease

oops, indeed. misspelled. does it work?

KinectDepthToSnappy.vl (41.8 KB)
It does, but I dont know how to turn it back into a mutable array for the decompression!

you simply use ToImage [MutableArray]. but be sure to feed it with the correct width, height and format, otherwise it will crash (this is what happened in the example i sent above).

i think the netmq should output the mutable array directly, i’ve already made an internal issue for this. if you get data from the net, that you have to process further, you almost always need an array instead of a spread.

as a workaround you can use FromSequence [MutableArray], this is another copy of the data but should work until the netmq lib got a design overhaul.