-
https://libvips.github.io/libvips/API/current/libvips-mosaicing.html I have a thousand of images that all have different amount of matching so I probably can't come up with universal numeric arguments.for vips_match. Also I can't tell I understand them at all. When I had a look on docs previously I believe I saw a function that produces a 2d bw map of level of matching between two images so I could then decide what do to with it. But I probably can't find what function that was and the...
just tells me I need something different. UPD: something like this: https://stackoverflow.com/q/36688439/322020 Or maybe that was UPD2: Or I guess it was but takes eternity to correlate two 1280x720 images while I have a thousand of them... UPD3: oh, and I just realised that it's only trying one quarter of relative shifting so I need to do it 4 times, right? rd = img11res.fastcor(img12res)
ru = img11res.flipver.fastcor(img12res.flipver).flipver
ld = img11res.fliphor.fastcor(img12res.fliphor).fliphor
lu = img11res.fliphor.flipver.fastcor(img12res.fliphor.flipver).fliphor.flipver
Vips::Image.arrayjoin([lu,ru,ld,rd], across:2).scaleimage.write_to_file "temp.png" Maybe I don't understand how it's supposed to work. It makes no sense to me. a = Vips::Image.new_from_array [[0,0,0,0,0],[0,1,0,0,0],[0,0,0,0,0],[0,0,0,0,0]] b = Vips::Image.new_from_array [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,1,0],[0,0,0,0,0]] Vips::Image.arrayjoin([lu,ru,ld,rd], across:2).scaleimage.write_to_file "temp.png" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Yes, There's |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
I guess I tried the wrong function.
phasecor
seems to be what I need:These as I understand are the shifting candidates per band.
What I don't yet understand is why it's
#<Image 160x90 double, 3 bands, b-w>
-- being b-w but with 3 bands makes the.write_to_file
save both dark and light pixels as white.How do I switch the interpretation?.copy(interpretation: :srgb)
P.S.: and it's weird that when I call it on two similar (i.e. no shift needed) or even identical images it's all a noise and no bright pixel in the left-top corner.
P.P.S: also there is a true point and three fa…