Note that there are some explanatory texts on larger screens.

plurals
  1. POFastSineTransformer - pad array with zeros to fit length
    primarykey
    data
    text
    <p>I'm trying to implement a poisson solver for image blending in <strong>Java</strong>. After descretization with 5-star method, the real work begins. To do that i do these three steps with the color values:</p> <ol> <li>using sine transformation on rows and columns</li> <li>multiply eigenvalues</li> <li>using inverse sine transformation on rows an columns</li> </ol> <p>This works so far. To do the sine transformation in Java, i'm using the Apache Commons Math package.</p> <p>But the <a href="http://ommons.apache.org/math/apidocs/org/apache/commons/math3/transform/FastSineTransformer.html" rel="nofollow" title="FastSineTransformer">FastSineTransformer</a> has two limitations:</p> <ol> <li>first value in the array must be zero (well that's ok, number two is the real problem)</li> <li>the length of the input must be a <strong>power of two</strong></li> </ol> <p>So right now my excerpts are of the length 127, 255 and so on to fit in. (i'm inserting a zero in the beginning, so that 1 and 2 are fulfilled) That's pretty stupid, because i want to choose the size of my excerpt freely.</p> <p>My Question is: <strong>Is there a way to extend my array e.g. of length 100 to fit the limitations of the Apache FastSineTransformer?</strong></p> <p>In the FastFourierTransfomer class it is mentioned, that you can pad with zeros to get a power of two. But when i do that, i get wrong results. Perhaps i'm doing it wrong, but i really don't know if there is anything i have to keep in mind, when i'm padding with zeros</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload