03-25-2016 02:27 AM
Good day to all.
Recently I have working on some image processing related to shortest path algorithm. I have came across "run length encoding". As it is not to understand the concept but I am have no idea, how to implement it in LabVIEW. My test images are in binary (0 and 1). and I am trying to get horizontal and vertical run length encoding of test images. I am looking for some suggestions and help regarding where and how to start.
For reference to run length encoding here is a link .
Thank you for any suggestions.
03-25-2016 12:02 PM
03-25-2016 02:10 PM
@kumar1993 wrote:have working on some image processing related to shortest path algorithm. I have came across "run length encoding". As it is not to understand the concept but I am have no idea, how to implement it in LabVIEW. My test images are in binary (0 and 1). and I am trying to get horizontal and vertical run length encoding of test images. I am looking for some suggestions and help regarding where and how to start.
RLE is typically used for compression, not for analysis. Since the output is compressed, it seems much more difficult to analyze it (e.g. for shortest path and such). Can you explain your reasoning behind your approach?
03-25-2016 08:51 PM
03-29-2016 12:59 PM
Ok, I have happen to figure this problem out. Thank you for all your help.
I felt I should be sharing this file for anyone else who could be interested in "Run-Length Encoding."
In this code, input image format is .BMP. There is a preprocess before the run length counting, in which you have to choose a threshold to convert image to binary. (so, Basically, it only works in grayscale domain.)
there is an output array as final result every odd index is number of balck pixels and every even is number of white pixels. This calculates run length vertically and horizontally.
03-29-2016 01:57 PM - edited 03-29-2016 01:58 PM
There are many places for improvement in efficiency and code readability. For example:
... just some ideas. There are many more 😉
03-29-2016 10:28 PM
02-01-2020 07:44 AM
Hey Kumar,
I was trying to implement simple run-length coding in LabVIEW as per my college project. The algorithm should simply contain an input stream and the output in the form of RLE, no images or anything but simply a bitstream. But, I don't know how to do it, can you help?