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:)
int x, y; camera_open(LOW_RES); camera_update(); camera_close(); while (b_button() == 0) { // run till B button is pressed camera_update(); // process the most recent image if (get_object_count(0) > 0) { //get x, y for the biggest blob the channel sees x = get_object_center(0,0).x; y = get_object_center(0,0).y; } else { } msleep(200); // give user time to read }
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
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
#YOLOSWAG
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
Hello! Very interesting topic, thank you raised it
sprint corporate
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
Try something new and safe for your devices. itpcexpert.com/icloud-unlock Great solution for iPhone users.
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
nice post
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
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