Ask Your Question
0

hybrid imaging syntax

asked 2013-04-02 20:07:01 -0600

I am trying to write a program in c++ that generates a hybrid image from two given images I know the process that I have to follow; I know the coordinates of the eyes so I can use them to align the images and scale them to proportion and then using gaussian filtering, a high pass filter on one and a low pass filter on the other I can extract the relevant data and combine the two into a hybrid image. I know the proces but I dont know the actual syntax I know what to do but I dont know how to do it. Can anyone give me an idea of where to go to find the actual syntax? Please Ive been searching and reading documentation for two days and have found nothing.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-03 03:20:30 -0600

Basically, you have just splitted up your problem into steps. Each of these steps can be done in OpenCV or in C++. It is up to you to combine each step.

  1. Aligning images on given position is just applying a translation/rotation to your image, which can be done with a rotation matrix. Look at http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/warp_affine/warp_affine.html.
  2. Low pass filtering : http://stackoverflow.com/questions/9841084/low-pass-filter-in-opencv --> can be adapted to be used for the C++ interface, would not be that hard. Same can be used for high pass filtering.
  3. Gaussian filtering = blurring = http://docs.opencv.org/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html
  4. Use the beneath functionality to blend both images.

I guess you do not prefer to blend images from the beginning, but it is a fully implemented function of openCV. Maybe see where this gets you?

http://docs.opencv.org/doc/tutorials/core/adding_images/adding_images.html

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-02 20:07:01 -0600

Seen: 856 times

Last updated: Apr 03 '13