Go to Post I guess instead of focusing on the stuff we wish we could have changed, we should focus on all of the wonderful stuff we accomplished instead! - Winged Wonder [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-01-2010, 13:47
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 Manipulation

Hi!

We are currently trying to edit around with the image we get from our dashboard.

For example, if we wanted to change which part of the image we get, how would we accomplish this?
Ex: Image size is a 100x100 rect, but we only want the top 50 pixels to display.

Anyone have any idea how to do this? We have been trying for a few hours to no avail...


Thanks!
-1771
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2010, 17:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Image Manipulation

The image being sent from the robot to the dashboard is the compressed image from the camera. While it is possible to have the robot uncompress, subset, compress, and transmit, you are obviously putting quite a bit of extra work on the cRIO. Instead, you may want to open the code for the dashboard, and on the dashboard, subset the image between the Get PC Image and the display.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 16-01-2010, 17:16
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Image Manipulation

Why do you just want the top 50px?

Although you can't mess with the Dashboard Image, you can crop images. I don't have the NI vision documentation with me, but it is something to the effect of
Code:
Image* orig=YourCameraImage;
Image* top50pxImg = imaqCreateImage(100,50);
imaqCrop(orig,top50pxImg,0,0,100,50)
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2010, 10:04
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Image Manipulation

Like Gred said though, the best approach would be to get access to the image through the dashboard and manipulate it on your laptop so you're not putting any more stress on your cRIO.
__________________
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Gallery Compnerd Website Design/Showcase 9 24-01-2008 00:26
Buzz's New Manipulation Technique? Neo3One3 Robot Showcase 7 12-01-2007 16:07
FIRST logo manipulation mightywombat IT / Communications 12 04-05-2004 20:23
Image Needed Tarsen Website Design/Showcase 1 17-10-2003 23:22


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

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