Coder Social home page Coder Social logo

jamie725 / rectangling-panoramic-images-via-warping Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 16.71 MB

Implement the paper "Rectangling Panoramic Images via Warping", SIGGRAPH 2013.

Home Page: http://research.microsoft.com/en-us/um/people/kahe/sig13/index.html

C++ 14.80% MATLAB 84.81% M 0.39%

rectangling-panoramic-images-via-warping's People

Contributors

jamie725 avatar joshaber avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

liuguoyou gqf126

rectangling-panoramic-images-via-warping's Issues

The SeamCarving results are not the same when recomputing the input image

Hello.

Thanks for the sharing, and the quality of the code is good!
However, I find some issues in the local warping using seamcarving that cause the different results even when computing the same input image.

In the Line 175 in addSeam.cpp, the code uses rand() to generate different colors for seams. However, when computing the next seam, the colored image would be used to compute the energy. The energy would not keep the same in different experiement repeatition since the colored seam would involved in energy computation and it is given as random. As a result, the final seams obtained would not be the same, and are slightly dependent on the randomized color seams.

#if 1
color[0] = rand()%256;
color[1] = rand()%256;
color[2] = rand()%256;
// Draw red on the seam
for (int i = 0; i < h; ++i) {
img[optVertSeam[i]*3] = color[0];
img[optVertSeam[i]*3+1] = color[1];
img[optVertSeam[i]*3+2] = color[2];
}
#endif
#if 0
// Draw red on the seam
for (int i = 0; i < h; ++i) {
img[optVertSeam[i]*3] = 255;
img[optVertSeam[i]*3+1] = 0;
img[optVertSeam[i]*3+2] = 0;
}
#endif

The overall image is updated with the output image with a color seam from addSeam.cpp. And in the next loop, the input image is resulted fromthe overall image with color seam.

idx = sub2ind(size(mask), y, x);
idx2 = cat(3, idx, idx+h*w);
idx3 = cat(3, idx2, idx+2*h*w);
subImg = img(idx3);
subMask = mask(idx);
subXDispMap = xDispMap(idx);
subYDispMap = yDispMap(idx);
[outImg, outMask, outXDispMap, outYDispMap] = addSeam_wrap(subImg, subMask, subXDispMap, subYDispMap);
img(idx3) = outImg;
mask(idx) = outMask;
xDispMap(idx) = outXDispMap;
yDispMap(idx) = outYDispMap;

The saved final result picture is distorted

Hello,when i try to save the final image in the meshwarp.m after line 42 use the code 'imwrite(outputimg./outputimgcount,'res.jpg');', and i find that the saved iamge is too small compared to the original image. I'm not sure is the problem of saving ways or somthing else. Could you give me some advice? Thank you very much.

Issue with MEX

Hey, I wanted to use this code for my project implementation but I am having problems with Visual C++ 2013 and MATLAB R2017a. Could you specify the Matlab version and the compiler you used for the work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.