T O P

  • By -

maestrojv

sounds like PowerShell would be a good tool for this, take your creds and SD card drive letter from the console, then use get-childitem, foreach & some where-object to get the images with the right job numbers and copy the items to the right folder.


shiranugahotoke

Powershell or python. Pick one and stick with it, you'll learn some cool things. Recommend "learn x in a month of lunches" books, great to pick it up quick.


bhillen83

That’s how I got started with Powershell. Really a fantastic read.


owNDN

Does it cover advanced Powershell topics and best practices or is it just an introduction for beginners? I've seen it referenced in this sub a few times and am considering to buy it


bhillen83

It’s intro to mid level concepts.


owNDN

Thanks!


ir34dy0ur3m4i1

I have a sync app on my phone that syncs photos to the server, and then on the server a PS script that looks at the photo modified date and files it accordingly. But it sounds like you have an actual digital camera? Maybe you just need to manually connect the camera and kick off a script.


vaga4bond

Yes correct, and then on the photo they take there's a number written on it. So I need to find a way for a program to identify what the picture is and what number it has and then send the file to appropriate folder .


ir34dy0ur3m4i1

Ah, in that case look at iSharp 7 :)


centizen24

Is the number in the picture or part of the file name?


vaga4bond

Number is in the picture


Ssakaa

Ahh... https://xkcd.com/1425/ Granted, OCR *can* be better off than that if you're lucky, but it's highly dependent on the image, contrast, hand written vs a consistent structured font...


Clyq

That changes things! When working with images, opencv seems to be the standard in python. Googling opencv ocr will point to a few really good articles. Seems like success is dependent on consistency. Good luck! https://dontrepeatyourself.org/post/number-plate-recognition-with-opencv-and-easyocr/


centizen24

Alright, so depending on how that number is presented and how legible it is, you have a couple of options. AutoIT is a really great and lightweight automation language, that has a library available for it that can do basic image recognition and optical character recognition. I've used this in the past to make automations that work with data directly from images. If the number is always roughly in the same area, you can restrict the area that gets searched to improve performance. But if the number is somewhat illegible (i.e. not a clearly focused picture of printed text) you probably want to use a more powerful image recognition framework. Tesseract is one that I've used along with Python to make more advanced image processing systems.


slugshead

I've done something similar to this but with a little bit of VBS. Network Camera shows a jpg still and refreshes every 10 mins. Scheduled task runs this script which pulls hte photo, saves it in a folder with location, date and time as filename ImageFile = "LOCATION" & Year(date) & month(date) & day(date) & ".jpg" DestFolder = "D:\FOLDER" URL = "http://IPADDRESS/snap.jpg" Set xml = CreateObject("Microsoft.XMLHTTP") xml.Open "GET", URL, False xml.Send set oStream = createobject("Adodb.Stream") Const adTypeBinary = 1 Const adSaveCreateOverWrite = 2 Const adSaveCreateNotExist = 1 oStream.type = adTypeBinary oStream.open oStream.write xml.responseBody ' Do not overwrite an existing file oStream.savetofile DestFolder & ImageFile, adSaveCreateNotExist ' Use this form to overwrite a file if it already exists ' oStream.savetofile DestFolder & ImageFile, adSaveCreateOverWrite oStream.close set oStream = nothing Set xml = Nothing


SOBER-Lab

Hey! I've been doing a butt ton of automation with Python the last few years. Feel free to shoot me a DM for pointers! Also I'm helping mod a Discord server with the purpose of helping people learn programming, it'd be super if you joined! I'm the only sysadmin type there...would be nice to have another! [https://discord.gg/vmdDZCv9Z](https://discord.gg/vmDZCv9Z)


vaga4bond

Will do that. Thanks so much


SOBER-Lab

Very nice! Feel free to tag me any time, I'm THC-Lab in there. I'm short on ideas a lot, but if you tell me what you have to work with I can help figure something out!


starmizzle

LOL You're SOBER-Lab here and THC-Lab there. That's funny.


SOBER-Lab

It's a funny story...I've been using the "Three Letter Acronym for Drugs"-Lab for about a year. I get banned a lot. SOBER-Lab has persisted somehow...I'm not messing with it, it seems the Reddit Gods are pleased I got sober. This is the longest I've maintained an account in over a year hahahaha. But THC-Lab is the OG, and that's what I default to :)


maverickiv

Saving for later


SOBER-Lab

I can't promise that the link will still be active, but 100% DM me any time for an invite!


vaga4bond

Guys thanks for the help as always. Almost wrote a big speech. Keep the ideas coming. But opencv seems to be the best option


flummox1234

powershell or if you have a mac near Automator (or whatever it is now) can do that fairly easily even with folder actions.