{"id":1966,"date":"2015-02-13T14:50:37","date_gmt":"2015-02-13T13:50:37","guid":{"rendered":"https:\/\/ridgesolutions.ie\/?p=1966"},"modified":"2015-02-13T15:52:18","modified_gmt":"2015-02-13T14:52:18","slug":"a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon","status":"publish","type":"post","link":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/","title":{"rendered":"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon"},"content":{"rendered":"<p>A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon (generated by pure C source code):<\/p>\n<p><a href=\"https:\/\/ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision.png\" alt=\"50_shades_of_grey_machine_vision\" width=\"1024\" height=\"768\" class=\"aligncenter size-full wp-image-1967\" srcset=\"https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision.png 1024w, https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision-300x225.png 300w, https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision-600x450.png 600w, https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision-800x600.png 800w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>And the source code:<\/p>\n<pre>\r\n\/\/\r\n\/\/\r\n\/\/ 50Shades.cpp : Something for the weekend - JM\r\n\/\/  I am sure that you could to this in abaout 6 lines of Python, but here it is in olde C\r\n\/\/\r\n\r\n#include <stdio.h>\r\n#include <stdlib.h>\r\n#include <string.h>\r\n\r\n#define IMAGE unsigned char\r\n\r\nvoid draw_grey_box ( IMAGE *vram, int x_size, int ix, int iy, int dx, int dy, IMAGE grey )\r\n{\r\n\tunsigned char *ptr;\r\n\tint   y;\r\n\tfor ( y = iy; y < iy+dy; ++y ) {\r\n\t\tptr = vram + ix + y * x_size;\r\n\t\tmemset ( ptr, grey, dx );\r\n\t}\r\n}\r\n\r\n\r\nint save_any_pgm_image2 ( IMAGE *ram, char *file, char *com, int x1, int y_1, int x2, int y2, int X_SIZE )\r\n{\r\n\tint    dx, y;\r\n\tIMAGE  *ptr;\r\n\tFILE   *fd;\r\n\tdx = x2-x1;\r\n\r\n\tif ( (fd = fopen ( file, \"wb\" )) == NULL ) {  \/*  1.29  *\/\r\n\t\tprintf   ( \"save_any_image File <%s> open failed to write\\n\", file );\r\n\t\tperror   ( \"pgm write\" );\r\n\t\treturn -1;\r\n\t}\r\n\tfprintf ( fd, \"P5 #%s\\n%d\\n%d\\n255\\n\", com, dx, y2-y_1 );\r\n\r\n\tfor ( y = y_1; y < y2; y++ ) {             \/*  Write it all out from gram *\/\r\n\t\tptr = ram + x1 + y * X_SIZE;\r\n\t\tif ( fwrite ( ptr, dx, sizeof( IMAGE ), fd ) != sizeof( IMAGE ) ) {\r\n\t\t\tfclose  ( fd );\r\n\t\t\treturn -2;\r\n\t\t}\r\n\t}\r\n\tfclose ( fd );\r\n\r\n\treturn y;\r\n}\r\n\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n\tint x_size = 1024, y_size = 768, i, x, y, dx, dy, nx = 10, ny = 5, ix, iy, grey = 1;\r\n\r\n\tprintf ( \"Image fILE in c:\\\\temp\\n\" );\r\n\tIMAGE *vram;\r\n\tdx = x_size \/ ( nx+1 );\r\n\tdy = y_size \/ ( ny+1 );\r\n\r\n\tvram = (unsigned char *)malloc ( x_size * y_size );\r\n\tmemset ( vram, 0, x_size * y_size );\r\n\r\n\tfor ( y = 0; y < ny; ++y ) {\r\n\t\tfor ( x = 0; x < nx; ++x ) {\r\n\r\n\t\t\tix = x * dx + dx \/ 2;\r\n\t\t\tiy = y * dy + dy \/ 2;\r\n\t\t\tdraw_grey_box ( vram, x_size, ix, iy, dx*9\/10, dy*9\/10, grey*5+3 );\r\n\t\t\t++grey;\r\n\t\t}\r\n\t}\r\n\tsave_any_pgm_image2 ( vram, \"c:\\\\Temp\\\\50_shades.pgm\", \"for Valentines day\", 0, 0, x_size, y_size, x_size );\r\n\r\n\treturn 0;\r\n}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend &#8211; JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[67,346,78],"class_list":["post-1966","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-c","tag-james-mahon","tag-machine-vision"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"A Machine Vision Engineer&#039;s take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kevin Godden\"\/>\n\t<meta name=\"google-site-verification\" content=\"Kyj52YLp6GOPA44PVBffo9fjW8rgWHYYRF0ZYjfy6ss\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Systems and Embedded Software Engineering, Ireland. | Some thoughts of a busy Computer Engineer\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon\" \/>\n\t\t<meta property=\"og:description\" content=\"A Machine Vision Engineer&#039;s take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2015-02-13T13:50:37+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2015-02-13T14:52:18+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon\" \/>\n\t\t<meta name=\"twitter:description\" content=\"A Machine Vision Engineer&#039;s take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#article\",\"name\":\"A Machine Vision Engineer\\u2019s take on Fifty Shades of Grey by James Mahon\",\"headline\":\"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon\",\"author\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/ridgesolutions.ie\\\/wp-content\\\/uploads\\\/2015\\\/02\\\/50_shades_of_grey_machine_vision.png\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#articleImage\"},\"datePublished\":\"2015-02-13T14:50:37+00:00\",\"dateModified\":\"2015-02-13T15:52:18+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#webpage\"},\"articleSection\":\"Uncategorized, c#, James Mahon, machine vision\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ridgesolutions.ie\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/uncategorized\\\/#listItem\",\"name\":\"Uncategorized\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/uncategorized\\\/#listItem\",\"position\":2,\"name\":\"Uncategorized\",\"item\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/uncategorized\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#listItem\",\"name\":\"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#listItem\",\"position\":3,\"name\":\"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/category\\\/uncategorized\\\/#listItem\",\"name\":\"Uncategorized\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#organization\",\"name\":\"Ridge Solutions, Software Development and Software Engineering, Ireland.\",\"description\":\"Some thoughts of a busy Computer Engineer\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/wp-content\\\/uploads\\\/2013\\\/09\\\/ridge_logo1.jpg\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#organizationLogo\",\"width\":400,\"height\":81},\"image\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/\",\"name\":\"Kevin Godden\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d2833f41e59a25cf2a9741a05ec383bfdd278762a5e0798a90940e7ab0a107a2?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kevin Godden\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#webpage\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/\",\"name\":\"A Machine Vision Engineer\\u2019s take on Fifty Shades of Grey by James Mahon\",\"description\":\"A Machine Vision Engineer's take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \\\/\\\/ \\\/\\\/ \\\/\\\/ 50Shades.cpp : Something for the weekend - JM \\\/\\\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/2015\\\/02\\\/13\\\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/index.php\\\/author\\\/kgodden\\\/#author\"},\"datePublished\":\"2015-02-13T14:50:37+00:00\",\"dateModified\":\"2015-02-13T15:52:18+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#website\",\"url\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/\",\"name\":\"Ridge Solutions, Software Development and Software Engineering, Ireland.\",\"description\":\"Some thoughts of a busy Computer Engineer\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ridgesolutions.ie\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon","description":"A Machine Vision Engineer's take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde","canonical_url":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"Kyj52YLp6GOPA44PVBffo9fjW8rgWHYYRF0ZYjfy6ss","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#article","name":"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon","headline":"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon","author":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author"},"publisher":{"@id":"https:\/\/www.ridgesolutions.ie\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/ridgesolutions.ie\/wp-content\/uploads\/2015\/02\/50_shades_of_grey_machine_vision.png","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#articleImage"},"datePublished":"2015-02-13T14:50:37+00:00","dateModified":"2015-02-13T15:52:18+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#webpage"},"isPartOf":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#webpage"},"articleSection":"Uncategorized, c#, James Mahon, machine vision"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie#listItem","position":1,"name":"Home","item":"https:\/\/www.ridgesolutions.ie","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/uncategorized\/#listItem","name":"Uncategorized"}},{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/uncategorized\/#listItem","position":2,"name":"Uncategorized","item":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/uncategorized\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#listItem","name":"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#listItem","position":3,"name":"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon","previousItem":{"@type":"ListItem","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/uncategorized\/#listItem","name":"Uncategorized"}}]},{"@type":"Organization","@id":"https:\/\/www.ridgesolutions.ie\/#organization","name":"Ridge Solutions, Software Development and Software Engineering, Ireland.","description":"Some thoughts of a busy Computer Engineer","url":"https:\/\/www.ridgesolutions.ie\/","logo":{"@type":"ImageObject","url":"https:\/\/www.ridgesolutions.ie\/wp-content\/uploads\/2013\/09\/ridge_logo1.jpg","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#organizationLogo","width":400,"height":81},"image":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author","url":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/","name":"Kevin Godden","image":{"@type":"ImageObject","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d2833f41e59a25cf2a9741a05ec383bfdd278762a5e0798a90940e7ab0a107a2?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kevin Godden"}},{"@type":"WebPage","@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#webpage","url":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/","name":"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon","description":"A Machine Vision Engineer's take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.ridgesolutions.ie\/#website"},"breadcrumb":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/#breadcrumblist"},"author":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author"},"creator":{"@id":"https:\/\/www.ridgesolutions.ie\/index.php\/author\/kgodden\/#author"},"datePublished":"2015-02-13T14:50:37+00:00","dateModified":"2015-02-13T15:52:18+00:00"},{"@type":"WebSite","@id":"https:\/\/www.ridgesolutions.ie\/#website","url":"https:\/\/www.ridgesolutions.ie\/","name":"Ridge Solutions, Software Development and Software Engineering, Ireland.","description":"Some thoughts of a busy Computer Engineer","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.ridgesolutions.ie\/#organization"}}]},"og:locale":"en_US","og:site_name":"Systems and Embedded Software Engineering, Ireland. | Some thoughts of a busy Computer Engineer","og:type":"article","og:title":"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon","og:description":"A Machine Vision Engineer's take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde","og:url":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/","article:published_time":"2015-02-13T13:50:37+00:00","article:modified_time":"2015-02-13T14:52:18+00:00","twitter:card":"summary","twitter:title":"A Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon","twitter:description":"A Machine Vision Engineer's take on Fifty Shades of Grey by James Mahon (generated by pure C source code): And the source code: \/\/ \/\/ \/\/ 50Shades.cpp : Something for the weekend - JM \/\/ I am sure that you could to this in abaout 6 lines of Python, but here it is in olde"},"aioseo_meta_data":{"post_id":"1966","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-09-13 18:55:50","updated":"2025-07-15 22:55:57","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ridgesolutions.ie\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ridgesolutions.ie\/index.php\/category\/uncategorized\/\" title=\"Uncategorized\">Uncategorized<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tA Machine Vision Engineer\u2019s take on Fifty Shades of Grey by James Mahon\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.ridgesolutions.ie"},{"label":"Uncategorized","link":"https:\/\/www.ridgesolutions.ie\/index.php\/category\/uncategorized\/"},{"label":"A Machine Vision Engineer&#8217;s take on Fifty Shades of Grey by James Mahon","link":"https:\/\/www.ridgesolutions.ie\/index.php\/2015\/02\/13\/a-machine-vision-engineers-take-on-fifty-shades-of-grey-by-james-mahon\/"}],"_links":{"self":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/posts\/1966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/comments?post=1966"}],"version-history":[{"count":0,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/posts\/1966\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/media?parent=1966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/categories?post=1966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ridgesolutions.ie\/index.php\/wp-json\/wp\/v2\/tags?post=1966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}