IISSSSUUEE2288--NNOOVV22001144 GGeett pprriinntteedd ccooppiieess aatt tthheemmaaggppii.ccoomm AAMMaaggaazziinneeffoorrRRaassppbbeerrrryyPPiiUUsseerrss FFUUZZEE BBAASSIICC IInnttrroodduucciinngg VVooIIPP SSeerrvveerr OOppeennCCVV AArrdduubbeerrrryy UUssiinngg GGiitt BBiittSSccooppee Win £450 worth ofprizes in ourFUZE BASIC programming competition RRaassppbbeerrrryyPPiiiissaattrraaddeemmaarrkkooffTThheeRRaassppbbeerrrryyPPiiFFoouunnddaattiioonn. hhttttpp::////wwwwww.tthheemmaaggppii.ccoomm TThhiissmmaaggaazziinneewwaassccrreeaatteedduussiinnggaaRRaassppbbeerrrryyPPiiccoommppuutteerr.
28 This month's Issue is packed with hardware and programming articles. We are pleased to present the first article in an OpenCV (open source computer vision) image recognition software series by Derek Campbell. The robot that Derek used to test the software configuration is shown on this month's cover.
Contents OPENCV 4 ComputerVision on the RaspberryPi ARDUBERRY 10 Unite the RaspberryPi and Arduino BITSCOPE 14 Part3: Electronic measurementwith the Oscilloscope add-on board VOICE OVER IP 20 Part2: Connecting to the telephone network VERSION CONTROL 26 Part2: Whathappens when you make documentchanges FUZE BASIC 32 Part4: Fontscaling plus we add the final touches to ourgame COMPETITION 39 Win one ofthree RaspberryPi FUZE kits worth atotal of£450 in ourprogramming competition THIS MONTH'S EVENTS GUIDE 41 Mechelen Belgium, Berlin Germany, Cheltenham UK, Hull UK, WarwickUSA HAVE YOUR SAY 42 Send us yourfeedbackand article ideas http://www.themagpi.com 3.
INTRODUCING OPENCV Optical Navigation Computer Vision on the Raspberry Pi Derek Campbell Guest Writer SKILL LEVEL : INTERMEDIATE Meet Piter, my avatar robot project. He stands on symbols are printed in green and look like this: two wheels and has a Raspberry Pi for brains.
decode the symbols. I could have sent the cv2.destroyAllWindows() camera images to a host computer and done the OpenCV processing there, returning the results Code walkthrough to the Raspberry Pi. However, that would mean To read an image from the Raspberry Pi camera the robot would not be truly autonomous.
Once we have used this program for the lighting imgThresholded = cv2.inRange(imgHSV, (lowH, situation in which we are going to operate, the lowS, lowV), (highH, highS, highV)) mask image will look like the top right quadrant Here, low'x' and high'x' are two tri-valued colour of the figure on the left. We make a note of the variables that represent the ends of a range of high and low colour values and encode them into colours between which OpenCV will accept as the actual runtime program as lowColour and being part of the patch. Why do we need a highColour.
the patch, we use a function called Armed with our centroid we can use the x value findContours(). You know what contour lines to steer the robot left and right until we get close on a map are, right? They are lines that join enough to the symbol to identify it. We can tell points that are at the same height above sea when we are close enough when the the patch level. These OpenCV contours represent a path gets to a certain size: through the bits in the mask image which have the same colour value. x, y, w, h = cv2.boundingRect(contour) Program 3- tracking.py This will give us the size of the patch as it In tracking.py we pass in the mask we found appears to the robot, so now we know when to using inRange() and we get back a set of stop driving forward.
corners and other significant features. We extract The matches we have left define how closely the them using the function detectAndCompute(). ideal image resembles the actual piece of the robot's view. We repeat the match process for keyPoints, descriptors = each candidate symbol. The more matches we detector.detectAndCompute(image, None) get, the more likely the symbol we’re looking at is the one in the ideal image.
ARDUBERRY Unite the Raspberry Pi and Arduino Introducing the Arduberry Dougie Lawson MagPi Writer SKILL LEVEL : BEGINNER Before I startI will give you two crucial definitions; popular micro computer used for education, by hobbyists and a whole variety of other folks for a 1) Micro-controller - an autonomous, single processor multitude of tasks. They are from the same stable, computer system that does not have an operating builtbytheirdevelopers forsimilarreasons.