entropy encoding for images
Show older comments
is there any source codes available for entropy encoding for images, please help
2 Comments
Walter Roberson
on 24 Dec 2012
What difficulty are you having with the code version of it that you wrote?
FIR
on 25 Dec 2012
Answers (2)
Image Analyst
on 24 Dec 2012
0 votes
If you've heard of it, then I'm sure there are.
8 Comments
FIR
on 25 Dec 2012
Edited: Walter Roberson
on 25 Dec 2012
Image Analyst
on 25 Dec 2012
You correct it by stepping through your code in the debugger. I can't do it because I don't have those functions. I know you know how to use the debugger by now. Evidently seq or count is not "a vector of positive finite integers" and you can find out why by examining the variable in the debugger.
FIR
on 25 Dec 2012
Image Analyst
on 25 Dec 2012
It's hard to believe you have used MATLAB for this long and have never stepped through your code or looked at variables. That is usually taught in the first hour of MATLAB training. Nevertheless, you can learn how to debug your code here: http://blogs.mathworks.com/videos/2010/09/02/using-debugger-to-walk-through-code/ You will absolutely need to learn how to debug your code because "debugging via the Answers forum" is a very inefficient and lengthy way to debug your code.
FIR
on 25 Dec 2012
FIR
on 25 Dec 2012
Walter Roberson
on 25 Dec 2012
what does
length(count)
show? And also
sum(count <= 0)
?
FIR
on 25 Dec 2012
Walter Roberson
on 25 Dec 2012
Edited: Walter Roberson
on 25 Dec 2012
If x is a numeric array, TABLE is a numeric matrix. If the elements of x are nonnegative integers, TABLE includes 0 counts for integers between 1 and max(x) that do not appear in x.
But you already read the documentation so you already knew that, so somehow you must have gotten some negative counts. What does
count(counts <= 0)
show, and what does class(count) show?
10 Comments
FIR
on 25 Dec 2012
Walter Roberson
on 25 Dec 2012
Then your data being tabulated is non-negative integers and some of the integers between the lowest value and the maximum value do not happen to have any pixels with that value, so as documented, tabulate() generated entries with 0 counts for those values. Consider removing the entries that have the 0 counts.
FIR
on 25 Dec 2012
Walter Roberson
on 25 Dec 2012
The error message you quoted was,
The symbol counts parameter must be a vector of positive finite integers.
0 is not a positive integer, so counts of 0 are not permitted. You must remove all entries with count of 0.
FIR
on 25 Dec 2012
FIR
on 25 Dec 2012
Walter Roberson
on 25 Dec 2012
I do not have that toolbox, so I do not know why it is taking so long. Have you tried using the profiler? Did you manage to find the reason why it was giving you infinite recursion ?
FIR
on 25 Dec 2012
FIR
on 25 Dec 2012
Walter Roberson
on 25 Dec 2012
Sorry, Google doesn't seem to be accessible to me tonight. Perhaps you could try it from your end?
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!