ybhan / Panoramic-Photo-Generation

📹 Generate panorama image from video
MIT License
30 stars 6 forks source link

About vectorization of Warping code #1

Open lavz94 opened 3 years ago

lavz94 commented 3 years ago

Hello ybhan great respository , I have changed some part of your code like Cylindrical warping to vectorized ones and achieved significant speedup ,but i could not vectorize this part of your code . In stitch.py ,Line number 38

for i in range(-y_min, h2 - y_min):  
        for j in range(-x_min, w2 - x_min):
            if np.any(img2[i + y_min][j + x_min]):
                img_output[i][j] = img2[i + y_min][j + x_min]

Any ideas ?

ybhan commented 3 years ago

Hi @lavz94 , thank you for reaching out. I see the difficulty on vectorizing this part. To achieve better image quality, it "inserts" part of img2 into img_output, overriding some existing values in img_output, which is different from a simple concatenation. Unfortunately, I don't have good ideas for vectorization at present, as I am a bit rusty on related libraries after nearly 3 years. Please feel free to let me know if you have improvements on this or any part of the code. You are also welcome to raise issues or pull requests. Thanks!

Zumbalamambo commented 3 years ago

+1