What I have is a picture taken from the ceiling providing a "radially distorted"/elliptical image. I need to unwarp it and make it a regular rectangular image. How would I do this programmatically using C/C++?
A lot of applications use PanoTools for this. I believe this can also be done with OpenCV.
Related
Assume I have two png pictures and I want to make a third one by overlapping them (like a watermark effect), and save the result on the disk. Are there some libraries for react-native to implement this?
Yes. You can use react-native-view-shot https://github.com/gre/react-native-view-shot . This is mainly for taking a screenshot of the view. The Layouting and overlapping can be done in react-native. If you need blurring etc, you need to make use other libraries such as react-native-blur etc
i am not shure, if there are many Processing-people inside Stackoverflow, anyway:
What is the fastest way to generate an animated .gif-file out of Processing 2?
Thanks in advance!
You've got a couple of options:
Use the gifAnimation library
Save an image sequence from Processing, then encode a gif with an external tool (like ImageMagick,GIMP, Photoshop, etc.)
Also check out this answer for more details
George's answer is correct if you want to do this programatically, and it's what you should do if you care about gif quality.
Another quick and dirty alternative is to capture your screen directly.
I use a tool called ScreenToGif. You can record your sketch directly, without any exporting or encoding on your end.
Here is another question with a bunch of similar tools.
I wanted to automate image comparison through dalekjs. Aim is to have better image comparisons through external libraries but for starters a basic image comparison will do to tell if image on page is equal to local image. Help is highly appreciated.
Still experimental and is yet to be merged into DalekJS core, but you could try using gskachkov's pull request here which adds screenshot comparison functionality to DalekJS.
Otherwise, I would recommend you to use PhantomCSS as your visual regression framework for the time being. PhantomCSS is built on top of CasperJS and uses Resemble.js for image comparison.
Dalek isn't designed to be used as an image comparison tool, but some people used it as a foundation to write their own tools, like siteeffect.io
If you need to want to compare two images you need to make a screenshot with Dalek, need to know the coordinates of the image & then run some image comparison using Image Magick or whatever.
If you have some code/experiment up on GitHub or so, I´m happy to provide guidance to get the data out of Dalek & to use it programmatically.
i have problems to obtain good thumb from some images, when the original images are striped or checked shirt.
With the magento's gd2 library resize() in Varien_Image_Adapter_Gd2 class (magento 1.5 version) i obtain an image with a strange effect that modify the aspect of real image.
I can't find the name of this effect, so i can't search this issue on google! :(
You can see my issue in these 2 images:
As you can see, on the thumb image there are some rolling strange lines in particular in top-left position.
The issue is more evident on checked shirt, so i have to find a solution to correct this.
If anyone have some tips on this issue, please said me! :)
thx
Luca
'Moire' is the pattern you describe and it is particularly visible due to use of 'gd2' library which may or may not use bicubic scaling.
I am not sure that #Guerra has understood the problem here, but, to me, it is a straightforward lack of bicubic (or better) scaling.
See the answer on this question and follow the link:
https://stackoverflow.com/a/255666/1617149
So you may want to scale your images for the frontend using imagemagick instead of the standard gd2 library that comes with Magento and use a filter.
You can run imagemagick through php (the proper way), or, if you have complicated image processing on the go, you can go commandline 'exec' and prototype your image processing that way. I don't have any ready-to-roll code for that, however, that is what you need: better thumbnail rendering than you get with gd2.
Try use cloudzoom, he autosize your images to fit on your needs.
http://ecommerce-team.com/cloud-zoom.html
I don't know anything about either library but I have to choose one of them.
Which one whould you recommend?
I'm using Perl. I need to generate images for weather site. The image is generated for a location and should contain temperature and a weather condition image inside. I guess this is a piece of cake for both libs. But I want to know which one is more powerful. I've read that libGD is not able to rotate text. Maybe there are some other drawbacks? Which one generates images faster? Whose API is easier to use?
according to this source, you should use GD:
GD and other modules built on top of that (like GD::Graph) are more aimed at producing "new" images like charts.
And you can read "Develop your own weather maps and alerts with Perl and GD", which is what you're looking for.
If you some some time. try them both, play a little, and decide.
I find both to be straightforward to use ImageMagick gives you a lot more power than gd. Here are two Magick examples from my posts:
How can I use IO::Scalar with Image::Magick::Read()
How can I resize an image to fit area with Image::Magick?
to give you examples of the API.
I have used GD to create a visualization.
See Script : giss-timeline-graphs.pl on that page.
imagemagick is more robust, however libGD should be able to cover most of the image generation tasks as well. you should see perl API/functions to both of these libraries to see what is more convenient for you.