Ask Your Question
1

How to zoom in and out in open cv? I am new for open cv so ,I request you to guide me

asked 2013-07-09 08:04:59 -0600

heena gravatar image

I want to resize the image , after zooming in and out. how to do it?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-07-09 13:06:08 -0600

CodeFinder gravatar image

You are probably searching for the function resize(), see here.

edit flag offensive delete link more
0

answered 2013-07-10 03:06:25 -0600

updated 2013-07-10 03:21:44 -0600

I would suggest using the properties of the region of interest parameter, before the step of resizing.

Some sample code which will guide you:

Mat original; imread('location', original);
//use info to calculate your roi based on current location of mouse pointer
Rect roi(0,0,50,50); 
Mat temp = original(roi);
imshow('temp', temp);
edit flag offensive delete link more

Comments

1

ok. I'll Implement this , if I will Face any problem. I will get back to you.

heena gravatar imageheena ( 2013-07-10 03:42:40 -0600 )edit

If i am right mat is defined in c? Do we have to use some other function in c++

heena gravatar imageheena ( 2013-07-10 03:48:30 -0600 )edit

Mat is actually the C++ variant of the C-style IplImage.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-10 03:49:13 -0600 )edit

i want to learn open cv programming, so from where should i start? Because talking to you make me think; i have to learn it from scratch.so please guide from where should i start?

heena gravatar imageheena ( 2013-07-10 03:56:55 -0600 )edit

Take a look at the tutorials of OpenCV or read the newly released book. Especially the last one is interesting if you have no OpenCV background.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-10 04:00:54 -0600 )edit

See I have few questions and confusions. I want you to clear it out. I want to do live zooming(in and out) not "video zooming". and how can we set zooming parameter. I ran this code "http://answers.opencv.org/question/10291/syntax-for-zooming-a-video/" but it is getting too much zoomed. i don't know which parameter is affecting, this zooming. is there any way to make me understand this code which is in link? so that my understanding get better. And what if we want to do live zooming with usb web cam(logitech). what i have to read and understand for that.

heena gravatar imageheena ( 2013-07-11 02:25:22 -0600 )edit

I will take a look at your comment in about an hour, be patient and please do not open new topics for the same problem.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 02:38:48 -0600 )edit

Basically you need to be sure that you actually want to perform software zooming? Probably your logitech USB webcam has an available API which can be accessed in C++ to call the zooming of the camera itself. Wouldn't that be more interesting?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 02:55:37 -0600 )edit

This http://www.quickcamteam.net/documentation/faq/can-i-use-logitech-webcams-for-my-own-application">link probably tells you everything you should do :) Go give it a try! Or have a look at this link.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 02:57:00 -0600 )edit

first link is not working. second link is not helpful. and yes i am using logitech camera. but you are not getting my question .. i just want to know how to implement zoom in and out in open cv.. and i am using code blocks to program it all.how to superimpose one image to whole screen.how to zoom in and out by camera in open cv. are there any predefined functions for this.

heena gravatar imageheena ( 2013-07-16 04:33:28 -0600 )edit

Question Tools

Stats

Asked: 2013-07-09 08:04:59 -0600

Seen: 15,420 times

Last updated: Jul 10 '13