MATLAB: How can we apply run length encoding on a binary image of size 964 * 1292

binary imagerun length encoding

I have an image of size specified as above. I want to apply run length encoding on it row by row and wants to store the results after traversal of each row.

Best Answer

For loop over the row indices, call your run length routine on the row content, probably store in a cell array.