tag:blogger.com,1999:blog-7008265127831057484.post8305769131786748073..comments2023-05-04T00:58:02.379-07:00Comments on Code included: Punch Card Reader - The Softwaredigitaltrailshttp://www.blogger.com/profile/16633409983665910035noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-7008265127831057484.post-79490942315598823992018-06-13T07:13:15.189-07:002018-06-13T07:13:15.189-07:00What would I need to change to read a white card w...What would I need to change to read a white card with black holes?Anonymoushttps://www.blogger.com/profile/04834929907512502355noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-32714891798390413762017-08-25T14:16:15.396-07:002017-08-25T14:16:15.396-07:00Good point. Nowadays it seems most libraries come...Good point. Nowadays it seems most libraries come in Python 3 versions (from pypi, installed with the &quot;pip&quot; tool). Paul Koninghttps://www.blogger.com/profile/12416467947933726126noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-15878059771679320482017-07-26T13:11:31.149-07:002017-07-26T13:11:31.149-07:00Plus you&#39;d have to make sure you have python3 ...Plus you&#39;d have to make sure you have python3 versions of the required libraries. But yes, it may all fall out easily, or maybe not.digitaltrailshttps://www.blogger.com/profile/16633409983665910035noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-5487709729339443562017-07-26T08:07:10.520-07:002017-07-26T08:07:10.520-07:00Usually running a Python 2 program through the 2to...Usually running a Python 2 program through the 2to3 tool is all that&#39;s needed to get it to work with Python 3. Paul Koninghttps://www.blogger.com/profile/12416467947933726126noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-45462695609667314302017-07-14T15:33:44.870-07:002017-07-14T15:33:44.870-07:00Wow! Such nostalgia this brings!Wow! Such nostalgia this brings!Anonymoushttps://www.blogger.com/profile/05789513132943745631noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-53896154454721988922016-07-08T16:42:38.130-07:002016-07-08T16:42:38.130-07:00Congratulations, that&#39;s good news. It&#39;s n...Congratulations, that&#39;s good news. It&#39;s nice that you took the time to do the job yourself. <br /><br />I&#39;m a bit surprised my code was able to cope. I guess the fact that your holes are smaller, closer together, and a different shape does not matter too much because your image quality is good to start with. <br /><br />Anyway, well done.digitaltrailshttps://www.blogger.com/profile/16633409983665910035noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-73343106214940127402016-07-08T10:28:52.546-07:002016-07-08T10:28:52.546-07:00Thank you Sir. I have edited your code and it scan...Thank you Sir. I have edited your code and it scanned my cards perfectly. Also I have learned Python in 3days. Thank you soo muchAnonymoushttps://www.blogger.com/profile/08151045913142467776noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-43295401405062035012016-07-07T15:34:03.998-07:002016-07-07T15:34:03.998-07:00thank you. my email is minabebawy@hotmail.com or e...thank you. my email is minabebawy@hotmail.com or eatscience2014@gmail.com<br />in case of you want to help me in the future.<br />Thank you for your quick replies.Anonymoushttps://www.blogger.com/profile/08151045913142467776noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-91249704888808476202016-07-07T15:07:56.978-07:002016-07-07T15:07:56.978-07:00The basis for a lot of my code is the rectangular ...The basis for a lot of my code is the rectangular nature of the punched holes and the expected layout of this particular kind of card. For example the code is written to be more precise when checking horizontal transitions, because the holes are narrow and closely spaced. <br /><br />As you are dealing with circular holes, the code would likely have to be quite different. As you already know VB, you might do better to google up some VB code to read a JPG into a VB array and then write your own code to traverse the array looking for black/white transitions.<br /><br />As your images are in high contrast black/white and very flat, your VB code could be much simpler: 1) find the edges, 2) look for the holes (white) at expected X,Y locations.<br />digitaltrailshttps://www.blogger.com/profile/16633409983665910035noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-14430400850370591602016-07-07T14:45:16.440-07:002016-07-07T14:45:16.440-07:00Dear Sir. Thank you for your reply. I changed the ...Dear Sir.<br />Thank you for your reply. I changed the dimensions in your code and it won&#39;t matter if it is in inches or cm, because you converted it into percentages (ratios).<br />I have no knowledge in Python and to let you know how deeply I need your code I am learning now Python.<br />But If you have time take a look in my punched card in the following dropbox link<br />https://www.dropbox.com/s/90az8d5n4cppo6z/Card1.jpg?dl=0<br />I have created a program in Visual Basic that can convert any image into punched cards like the one I am sending you now.<br />But I have a large number of loom punched cards that I want to scan and convert them into zeros and ones that My program can convert them into carpet for my factory.<br /><br />My card contains only 36 columns not 80 columns like yours.<br />The holes in the card are circular not rectangular like yours.<br />If you are not free just tell me which part of the code shall I change to let your program read my cards.<br /><br />I need to develop it to export data to excel file like I did with Visual Basic.<br /><br />Thank you for your time and reply and I want to thank you soon for your help also.<br /><br />Sir this is the practical application of your code... Anonymoushttps://www.blogger.com/profile/08151045913142467776noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-27082517100233250892016-07-07T14:39:24.062-07:002016-07-07T14:39:24.062-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08151045913142467776noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-20649903785158153772016-07-06T05:04:44.024-07:002016-07-06T05:04:44.024-07:00I&#39;m sorry, if you are unable to handle units c...I&#39;m sorry, if you are unable to handle units conversion, then I would advise that should do some preparatory study in programming or Computer Science before attempting something complex like modifying the code to handle some other kind of punch card. It won&#39;t be as simple as changing the dimensions, Jacquard cards don&#39;t even have similar hole spacing, this would likely throw off the heuristics in the code. My basic approach might still apply, but much of the code would likely have to be very different.digitaltrailshttps://www.blogger.com/profile/16633409983665910035noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-35974749674985481512016-07-06T04:21:46.926-07:002016-07-06T04:21:46.926-07:00Can i put the dimensions of the card in cm not inc...Can i put the dimensions of the card in cm not inches?Anonymoushttps://www.blogger.com/profile/08151045913142467776noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-41256458315793920342014-10-07T20:52:12.239-07:002014-10-07T20:52:12.239-07:00It was written for python 2.7, you&#39;re probably...It was written for python 2.7, you&#39;re probably attempting to run in in python3 or above - they made some incompatible changes to the language. In particular, the print statement changed to being a function so print a, b has to be changed to print(a,b). There may be problems with supporting libraries as well. If your system has python2 installed, I suggest trying that first.digitaltrailshttps://www.blogger.com/profile/16633409983665910035noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-56993709392761470382014-10-07T10:26:56.240-07:002014-10-07T10:26:56.240-07:00I think there might be a few syntax errors. It kee...I think there might be a few syntax errors. It keeps saying there is a syntax error on line 134 no matter what that line says.Mercuriohttps://www.blogger.com/profile/16395275002991983148noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-45538744623162733142012-09-25T04:07:55.641-07:002012-09-25T04:07:55.641-07:00Thank you to sharing your good experience with us ...Thank you to sharing your good experience with us<br /><br />yes its a good idea for making the different kind of picture, <br /><a href="http://allidsystems.com/article/card-slot-punch/" rel="nofollow">Card Slot Punch</a>Anonymoushttps://www.blogger.com/profile/18344131143396211641noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-29036350870917966782012-09-07T21:46:37.605-07:002012-09-07T21:46:37.605-07:00Thanks for the feedback - it&#39;s good to know th...Thanks for the feedback - it&#39;s good to know the code is being put to use. I do quite a bit of hiking with a GPS, I keep meaning to investigate geocaching.digitaltrailshttps://www.blogger.com/profile/16633409983665910035noreply@blogger.comtag:blogger.com,1999:blog-7008265127831057484.post-26782086470091601172012-09-07T04:10:14.099-07:002012-09-07T04:10:14.099-07:00Great tool, I used it to decrypt a mystery on geoc...Great tool, I used it to decrypt a mystery on geocaching.com.<br />The lines where a bit out of alignment so I have to edit the image with the gimp.<br />Thanks for your work.Anonymousnoreply@blogger.com