{"id":368,"date":"2016-07-06T21:17:41","date_gmt":"2016-07-06T21:17:41","guid":{"rendered":"http:\/\/kavionic.com\/wordpress\/?page_id=368"},"modified":"2016-09-04T20:59:47","modified_gmt":"2016-09-04T20:59:47","slug":"pixmicro","status":"publish","type":"page","link":"http:\/\/kavionic.com\/blog\/pixmicro\/","title":{"rendered":"Pixmicro"},"content":{"rendered":"<p><span style=\"font-family: 'Source Sans Pro', Helvetica, sans-serif; font-size: 16px; line-height: 1.5;\">Pixmicro is a webcam viewer with some extra features to make it useful together with a camera guided PCB drill JIG described\u00a0<\/span><a style=\"font-family: 'Source Sans Pro', Helvetica, sans-serif; font-size: 16px; line-height: 1.5;\" title=\"Building a camera guided PCB drill jig\" href=\"http:\/\/kavionic.com\/blog\/Building_a_camera_guided_PCB_drill_jig\">here<\/a><span style=\"font-family: 'Source Sans Pro', Helvetica, sans-serif; font-size: 16px; line-height: 1.5;\">.<\/span><\/p>\n<p>The main features that makes it useful together with the JIG is support for a movable cross-hair and a circle detection function optimized for detecting holes etched in the copper of a PCB or drilled through it.<\/p>\n<p>Whenever the cross-hair is placed over a hole in the PCB a circle is drawn where Pixmicro think the edge of the hole is. Pressing a &#8220;Calibrate&#8221; button will center the cross-hair in this hole. It also render an aiming guide to help you center the hole where the drill bit will enter after calibration.<\/p>\n<h3><span style=\"text-decoration: underline;\">Using Pixmicro<\/span><\/h3>\n<p><a href=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_NonCentered.jpg\"><img loading=\"lazy\" class=\"wp-image-377 alignright\" alt=\"Pixmicro_NonCentered\" src=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_NonCentered-300x198.jpg\" width=\"400\" height=\"198\" \/><\/a><\/p>\n<p>Using Pixmicro together with the drill jig is fairly straight forward. First you drill a calibration hole in a part of the PCB that is going to be trimmed away (or in a scrap PCB or anything else that leaves a clean hole with enough visual contrast). Then you move the cross-hair over the hole. You should now see a blue tinted circle around the edge of the hole indicating that Pixmicro has detected it. If this don&#8217;t happen, you might need to adjust the &#8220;Threshold&#8221; and &#8220;Roundness&#8221; sliders to make it properly detect the hole. When it properly detects the hole, you can click the &#8220;Calibrate crosshair&#8221; button to make it automatically center the crosshair over the calibration hole.<\/p>\n<p>Now you are ready to start drilling the PCB. Move the PCB so the first pad you want to drill is under the crosshair. The pad should have a small hole etched in it for aiming. I post-process the drill-file to make all holes 0.3mm in diameter regardless of actual drill-size. This give a nice aiming point and the small size assures that even if I&#8217;m not hitting center 100% I will still have copper to the edge of the hole.<\/p>\n<p>When the crosshair enter the hole, you should see the blue tinted circle again. If you are close enough to the center, you will get a horizontal and vertical aiming guide. When both aiming guides align with the crosshair you have it perfectly centered and are ready to drill. The distance from the aiming guides to the crosshair is 3 times the actual offset from center. This to make it easier to tell when the aim is perfect.<\/p>\n<p>In the first picture the aim is off a bit and the vertical indicator is red to indicate that it is off by a fair bit, and the horizontal indicator is yellow since it is a bit closer.<\/p>\n<p><a href=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_Centered.jpg\"><img loading=\"lazy\" class=\"wp-image-374 alignright\" alt=\"Pixmicro_Centered\" src=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_Centered-300x198.jpg\" width=\"400\" height=\"198\" \/><\/a><\/p>\n<p>In the second picture the PCB has been moved a bit down and to the right. The horizontal aim is now perfect and the vertical aim is almost perfect (aiming guide is now green).<\/p>\n<p>If you notice that the drill bit start moving away from the crosshair in a consistent direction the jig might have lost calibration slightly (something moved). If so it can easily be re-calibrated by clicking the &#8220;Calibrate crosshair&#8221; button again after drilling a hole.<\/p>\n<h3><span style=\"text-decoration: underline;\">User interface<\/span><\/h3>\n<p>In the &#8220;Windows&#8221; menu you can open\/close 3 different windows. This windows are by default docked along the right edge of the main window, but can be dragged off and made floating. They can also be re-docked along any of the main window edges\/corners or combined with each other in a tabbed view.<\/p>\n<p>The windows have the following functions:<\/p>\n<h3><span style=\"text-decoration: underline;\">Camera<\/span><\/h3>\n<p><a href=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_WndCamera.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-378 alignright\" alt=\"Pixmicro_WndCamera\" src=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_WndCamera.jpg\" width=\"188\" height=\"92\" \/><\/a><\/p>\n<p>This window allow you to select witch camera to use if multiple cameras are connected to the computer. It also allow you to flip the camera image along any of the two axis. This is useful for the camera jig as the camera is mounted below the PCB and moving it forward on the jig would move it downward on the screen unless you where able to flip the image vertically.<\/p>\n<h3><span style=\"text-decoration: underline;\">Hole detect<\/span><\/h3>\n<p><a href=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_WndHoleDetect.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-380 alignright\" alt=\"Pixmicro_WndHoleDetect\" src=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_WndHoleDetect.jpg\" width=\"188\" height=\"261\" \/><\/a><\/p>\n<p>The &#8220;Hole detect&#8221; window allow you to enable \/ disable the hole detector and to adjust how it detects the hole and how it present the result.<\/p>\n<p>The hole detector have the following controls:<\/p>\n<div>\n<ul>\n<li><b>Enable<\/b>\u00a0&#8211; Enable \/ disable the hole detector.<\/li>\n<li><b>Freeze center color<\/b>\u00a0&#8211; By default the edge of the hole is defined as the point where the color differ enough from the color at the center of the crosshair. By ticking this check box you freeze the color used as a center reference to whatever is currently below the crosshair. This can make the detection a bit more stable if the color the camera detect at the center of a hole vary a bit between frames.<\/li>\n<li><b>Center color<\/b>\u00a0&#8211; Show the color currently used as a center reference. Unless &#8220;<b>Freeze center color<\/b>&#8221; is checked, this is the color currently under the crosshair center.<\/li>\n<li><b>Marker color<\/b>\u00a0&#8211; The color used to indicate the hole when detected. Clicking it will open a color picker dialog allowing you select a new color. Move the dialog off a bit to see the changes in real-time.<\/li>\n<li><b>Marker alpha<\/b>\u00a0&#8211; The transparency of the hole indicator.<\/li>\n<li><b>Marker width<\/b>\u00a0&#8211; The thickness of the circle drawn to indicate the detected hole.<\/li>\n<li><b>Threshold<\/b>\u00a0&#8211; Slider selecting how different the color needs to be from the center color for it to be considered the edge of the hole.<\/li>\n<li><b>Roundness<\/b>\u00a0&#8211; The hole is detected by tracing 16 &#8220;spokes&#8221; from the center of the crosshair and outwards until the edge is detected. Then the longest and shortest spokes are ignored before the hole center and radius are calculated. In a perfect circle all spokes have the same length. In a square the spokes going diagonally will be longer than those going horizontal and vertical. The\u00a0<b>Roundness<\/b>\u00a0slider select how much the spoke lengths are allowed to vary before the detection is rejected.<\/li>\n<li><b>Calibrate crosshair<\/b>\u00a0&#8211; Clicking this button will move the crosshair to the currently detected hole center if any.<\/li>\n<\/ul>\n<\/div>\n<h3><span style=\"text-decoration: underline;\">Edge detect<\/span><\/h3>\n<p><a style=\"line-height: 1.5;\" href=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_WndEdgeDetect.jpg\"><img loading=\"lazy\" class=\"size-full wp-image-379 alignright\" alt=\"Pixmicro_WndEdgeDetect\" src=\"http:\/\/kavionic.com\/blog\/wp-content\/uploads\/2016\/07\/Pixmicro_WndEdgeDetect.jpg\" width=\"188\" height=\"152\" \/><\/a><\/p>\n<p>The &#8220;Edge detect&#8221; window allow you to enable \/ disable an edge detect filter and to adjust it&#8217;s sensitivity. This window is closed by default, and is mostly a result from me experimenting with the OpenCV image processing library. I hope to add more useful filters later.<\/p>\n<h3><span style=\"text-decoration: underline;\">Download<\/span><\/h3>\n<p>The latest version can be downloaded here:<\/p>\n<p>64-bit:\u00a0<a href=\"http:\/\/kavionic.com\/Pixmicro\/PixmicroSetup-0.2.exe\">PixmicroSetup-0.2.exe<\/a><\/p>\n<p>32-bit:\u00a0<a href=\"http:\/\/kavionic.com\/Pixmicro\/PixmicroSetup32-0.2.exe\">PixmicroSetup32-0.2.exe<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Older versions can be found here:<\/p>\n<p>64-bit:\u00a0<a href=\"http:\/\/kavionic.com\/Pixmicro\/PixmicroSetup-0.1.exe\" rel=\"nofollow\">PixmicroSetup-0.1.exe<\/a>.<\/p>\n<h3><span style=\"text-decoration: underline;\">Sources<\/span><\/h3>\n<p>Pixmicro is released under the GPL license, and the sources can be fond on github:\u00a0<a href=\"http:\/\/github.com\/kavionic\/Pixmicro\" rel=\"nofollow\">http:\/\/github.com\/kavionic\/Pixmicro<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pixmicro is a webcam viewer with some extra features to make it useful together with a camera guided PCB drill JIG described\u00a0here. The main features that makes it useful together with the JIG is support for a movable cross-hair and a circle detection function optimized for detecting holes etched in the copper of a PCB &hellip; <a href=\"http:\/\/kavionic.com\/blog\/pixmicro\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Pixmicro<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":377,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/pages\/368"}],"collection":[{"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":7,"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/pages\/368\/revisions"}],"predecessor-version":[{"id":506,"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/pages\/368\/revisions\/506"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/media\/377"}],"wp:attachment":[{"href":"http:\/\/kavionic.com\/blog\/wp-json\/wp\/v2\/media?parent=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}