Re: Generating a random matrix through a natural image



Dev wrote:
On Aug 21, 3:14 am, aruzinsky <aruzin...@xxxxxxxxxxxxxxxxxxxx> wrote:
On Aug 20, 2:31 am, Dev <gun...@xxxxxxxxx> wrote:
Thanks for all the replies. I tried the ones sent by Thomas and
Edward, but came up with problems. For aruzinsky's method, can you pls
send me the algorithm, so that I can try it out? Meanwhile I tried a
dewhitening method, though it takes away the correlations, it doesn't
give the same histogram. Any further help is greatly appreciated.
Thanks,
Dev- Hide quoted text -
- Show quoted text -
I believe illywhacker is correct, you can't get rid of correlations by
permuting the pixels. However, I suspect that, for a 256x256 image,
the correlations are sufficiently close to zero for most or all
practical intents and purposes.

You take any sorting algorithm and modify it to operate on two arrays,
array1 and array2. Comparisons are made only on the elements of
array1, whereas element movements are made on both arrays. Thus,
"array2 is sorted with respect to values in array1." Alternatively,
you can modify a sorting algorithm to sort an array2 of indices
without sorting array1.- Hide quoted text -

- Show quoted text -

Just to clarify my intention, I am testing an algorithm fro
deconvolution. The algorithm works perfectly for a random image, but
not for a natural image like lena. So I want to test whether there's
any effect on correlation of pixels to my algorithm. For that I need
to take away the correlation between pixels in the lena image, but
keep the same histogram, so that the values are same.

OK. The simplest way is to shuffle the pixels. Doesn't really matter how you do it provided that the random number generator is reasonably good.

But if you are trying to test a convolution/deconvolution algorithm you probably want to start with simple test pieces like a delta function at various places on the source image.

My guess is that you have not handled the edge boundary discontinuity correctly. In a random noise image there will not be one.

Regards,
Martin Brown
** Posted from http://www.teranews.com **
.



Relevant Pages

  • Re: Generating a random matrix through a natural image
    ... For example, if we take the lena image 256x256, the pixel values in ... between pixels in a natural image. ... you can't get rid of correlations by ... You take any sorting algorithm and modify it to operate on two arrays, ...
    (sci.image.processing)
  • Re: Generating correlated random numbers
    ... Here is a winbugs program to implement the algorithm above. ... program generates several independent poisson variables - x. ... The covariance of the correlated Poissons is the mean of the ... I'll leave it to you to form more complicated sets of correlations. ...
    (sci.stat.math)
  • Convert to Positive Definite/Semi-Definite - Asset Allocation issue
    ... I need some help in identifying a procedure, better yet the algorithm ... to convert a correlation matrix that is not positive ... correlations of one of the two offending asset classes by a small ...
    (comp.soft-sys.matlab)
  • Re: replace characters by numbers
    ... No - for that you'd need a lookup table or an algorithm. ... correlations do you expect to see? ... > does the macro also work if the correlation between characters and numbers is ...
    (microsoft.public.excel.programming)
  • Re: Drawing floating-point lines with Bresenham
    ... I can give an integer starting point, integer number of pixels, error increments for minor/major steps, and an initial error value for the first pixel to draw. ... That's the paper introducing Bresenham's line algorithm. ... "Zuse, Zuse" sprach die Tante, als das Rechenzimmer brannte ...
    (comp.graphics.algorithms)