Go to Post I'm not sure I like this: corn dogs, cheesecake and lard. - Tom Ore [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 24-02-2012, 17:18
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Image Cropping/Mask?

Hi-

I am trying to crop out a certain part of an image to process.
I am able to create a region of interest, but when i try to crop out the rest of the picture, I can't seem to do it.

This is the relevant part of my code:

Code:
ROI* roi;
roi = imaqCreateROI();
imaqAddRectContour(roi,imaqMakeRect(0,0,220,640));
It is at this point I get stuck. I plan on using the imaqROIToMask function, but I can't get it to work.

This is what I am doing-
Code:
ROI* roi;
roi = imaqCreateROI();
imaqAddRectContour(roi,imaqMakeRect(0,0,220,640)); //top of image
ColorImage* origImage = camera.GetImage();
ColorImage* croppedImage;
imaqROIToMask(????????);
At the imaqROIToMask line I get errors no matter what I try to do.

Basically I just want the camera tracking/processing code to only look in a certain portion of the image. Sadly I couldn't find a "crop" function in the nivision.h library.

Thanks!
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi