OK, so I'm wondering how to apply a new graphical plugin for Paint.NET and I need it How to find out the most common integer in a 2D array of integers is there an underlying way for C # to do this? Or, does anyone have a clever way of doing this?
The array will look something like this: <300 p 300 <30000 150 0 >
I would need to know that the 300 is the most common number in the array. If there is no "most common" then just return the center number (decrease in the array will always be weird) 0.
I will apply it using the "brute force" algorithm unless you are a specialist
Thank you!
Edit: More info ...
P> Values will almost always be very different (more diverse than my example array). The size of the array will be in the range of 0-360, depending on the speed of the algorithm, the size of the array will be approximately 5x5 by 17x17. The result will be calculated once for each pixel in a big picture ... so fast is so fast. ;)
Take a look at the local histogram effect code in Paint.NET, especially the local HistoRamam Effect . Redirection
I take the input image to keep the histogram of intensity with the 'R' pixels of the intense pixels for each image pixel as the output pixels are wavy, it adds leading edges for the histogram and Decreases the trailing edge; it handles all the edge cases well, and is quite fast.
It would be appropriate to support Hugh instead of RGB Intensity.
Performance is quite good, and for your purposes it is running in O (R ^ 2 + WWWDAR NN
-tjackson
Comments
Post a Comment