Re:Show HN: Trigrad, a novel image compression with interest...
by ruarai on Saturday July 04, 2015 @06:38AM
(#9829809)
This is an area that needs work, but basically there's the table of 'edge intensity' that gets multiplied by a constant baseChance variable for every pixel.
baseChance = 8 * samples / (width * height)
samples is the desired number of samples.
Again, this needs work. I'm pretty sure there's a way I can more accurately match the number of output samples to the desired number of samples.
Edit: And no, it can't produce a response if there's no edge (a value of zero). However, there's always some level of noise. This is true of the example you've shown - there's very light noise visible.
Re:Show HN: Trigrad, a novel image compression with interest...
by JosephRedfern on Saturday July 04, 2015 @07:17AM
(#9829853)
I see - thanks for the explanation!
Have you tried using Canny Edge detection rather than Sobel? It might help a bit with the noise. I've just attempted it, but can't seem to get Canny working under Mono (I've not got a windows machine at the moment).
EDIT: I've read the code - it seems to be using random sampling. Still not entirely sure how a point can be placed at a place with absolutely no Sobel response - maybe it can't, which would make sense. My question arose after looking at: https://i.imgur.com/9YHOtQ0.png and then https://i.imgur.com/XRF7mz4.png. It looks like samples have been placed in regions with no response, but perhaps my eyes just can't see the edges.