I am trying to subsample an image only in the vertical direction by a factor t (value is a geometric progression with common ratio sqrt(2)).
Is there any built-in function to subsample images? I was thinking of restrict() but since t is variable and irrational I am not sure if that is a good idea.
Can’t you do it just by indexing into the images directly? Like img[t, :]. It’s not clear exactly what tis, though. Is it a vector, a function or what?
Can you clarify what you mean by subsampling? To me, that means selecting a subset of the currently available samples. But maybe you are talking about re-sampling, using e.g. interpolation or smoothing?
Hi, t is a variable inside a loop. Initially t=1 and in further iterations of the loop it gets multiplied by sqrt(2).
I can try indexing into the image. The issue is my code is already at O(n^3) complexity. I was wondering if there is already an inbuilt function which won’t affect the complexity too much.
I mean subsampling=downsampling, i.e. taking the tth rows of pixels and ignoring the intermediate ones in case of vertical downsampling.
I was actually thinking the same. But have a confusion. For eg., in Matlab the image resize function uses weights on the surrounding pixels while resizing the image. But according to the paper I am trying to implement, I just need to skip the intermediate rows of pixels and consider only those rows which are multiples of t, and there are no weight involved. So I am not sure if Julia uses weights while discaring pixels to resize the image.