12 replies [Last post]
Title: NooBot
Joined: 07/18/2011
BotPoints: 136
User offline. Last seen 6 years 16 weeks ago.

So for some reason I am having difficulty using the camera. Our LINK detects color blobs perfectly well during the time that we test it under the Channels section, but when we actually run a program, it doesn't recognize any objects. I used the workshop code just to make sure it wasn't me, it still didn't work even though I put the object right in plain view of the camera.

I tried different cameras and both ports, not sure what the problem is. Any suggestions?

(Here's the code:)

  1. int x, y;
  2. camera_open(LOW_RES);
  3. camera_update();
  4. printf("\n\n%d\n\n", get_object_count(0));
  5. camera_close();
  6. while (b_button() == 0)
  7. { // run till B button is pressed
  8. camera_update(); // process the most recent image
  9. if (get_object_count(0) > 0)
  10. {
  11. //get x, y for the biggest blob the channel sees
  12. x = get_object_center(0,0).x;
  13. y = get_object_center(0,0).y;
  14. printf("Biggest blob at (%i,%i)\n",x,y);
  15. }
  16. else
  17. {
  18. printf("No color match in Frame\n");
  19. }
  20. msleep(200); // give user time to read
  21. }

-amehta (Andrew Mehta)

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
BotPoints: 1168
User offline. Last seen 8 years 2 weeks ago.

I haven't used the Link's vision libs yet, but is there a reason why you're calling camera_close() before calling other camera functions?

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

TBTF's picture
Title: NooBot
Joined: 07/11/2010
BotPoints: 25
User offline. Last seen 9 years 48 weeks ago.

There are three reasons I can see that your robot would be doing this:

First, you need to make sure that one of the camera configurations on the Kovan is selected as the default configuration, otherwise camera_open(LOW_RES) won't open any configuration, and no blobs will be seen. Selecting the default configuration is done on the screen that shows a list of all the .config files you've created. The current default configuration (if there is one) will have a star by it.

Second, camera_close() should only be called if you aren't going to use the camera anymore or if you intend to reopen it with a different resolution like MED_RES or HIGH_RES. As a result, any camera function called after you close the camera won't work.

Third, there was a bug on older firmwares where camera_update() didn't retrieve the most recent frame until the third or fourth call. I'm not sure if this still happens on the newer firmwares. Other than that you're code should be fine.

Norman Advanced Robotics

Title: NooBot
Joined: 07/29/2016
BotPoints: 22
User offline. Last seen 6 years 44 weeks ago.

Thanks a lot for sharing. You have done a brilliant job. Your article is truly relevant to my study at this moment, and I am really happy I discovered your website.
get help with file explorer in windows 10

Title: NooBot
Joined: 05/29/2017
BotPoints: 64
User offline. Last seen 4 years 51 weeks ago.

Hello! Very interesting topic, thank you raised it
sprint corporate

Title: NooBot
Joined: 04/28/2017
BotPoints: 20
User offline. Last seen 5 years 14 weeks ago.

Programming with similar devices is a very complex task and I don’t think it is better to try and repair it by ourselves. The best way is to ask the help of experts regarding the issue. Please stay updated with the details. online computer support service

Title: NooBot
Joined: 08/04/2017
BotPoints: 6
User offline. Last seen 5 years 43 weeks ago.

Try something new and safe for your devices. Great solution for iPhone users.

Title: NooBot
Joined: 10/04/2017
BotPoints: 10
User offline. Last seen 5 years 33 weeks ago.

Papas sushiria is a new crazy for online gamer papa games free and every new gamer want to connect with it .Guys papa sushiria is very popular gaining website .Thanks a lot

Title: NooBot
Joined: 04/28/2017
BotPoints: 20
User offline. Last seen 5 years 14 weeks ago.

nice post

Title: NooBot
Joined: 06/26/2018
BotPoints: 16
User offline. Last seen 4 years 40 weeks ago.

Botball participants to hang out and get to know each other, as well as offer technical assistance or collaborate on Botball. Remember that this channel is used by a wide range of audiences. We want to keep a relaxed, open, and enjoyable atmosphere. compare internet providers

peterseo's picture
Title: NooBot
Joined: 08/07/2018
BotPoints: 60
User offline. Last seen 4 years 43 weeks ago.

I havent any word to value this post.....Really i am inspired from this post....the individual who make this post it was an extraordinary human..thanks for imparted this to us. Software