Jump to content

Windows Camera tablet solution


onefish

This topic is 2710 days old. Please don't post here. Open a new topic instead.

Recommended Posts

It's been a very long time since I've developed in Filemaker (remember FM7?). Anyway, I am currently putting together a solution for field collection of data and images using Filemaker on Windows 10 tablets. I ended up purchasing Lenovo Yoga 2 10.1" tablets and upgrading the OS's straight away. I couldn't find "the perfect hardware" for all day field work including photo capture, often in low light. The Lenovo's won because they were the only Windows tablets that would give me a full 10hrs use in the field without having to carry some belt mounted extra battery pack, and the camera is acceptable at 8MP.

Now to get Filemaker playing nicely with the Windows camera app. This turned out to be a bit more complicated than I originally thought it would be. The camera app is a modern app and can't be called up with a simple start/run command to the exe. What I wanted was to select a container field, have the windows camera app open up, when I take a picture bring Filemaker to the front and insert the picture into the container field, all without additional dialogue or data entry required. I looked into the plugin solutions available but they all used a snapshot/screenshot of the video feed which is very poor quality (too poor for my application). I also wanted to stay far far away from FM Go.

Anyway, I have it just about complete now using 1x global field and 2x scripts in Filemaker and 1x external AutoIT script. Well, actually I use a couple more global fields just to store some AutoIT script parameters but they can be hard coded to. In a nutshell the workflow is:

  1. User selects container field with script trigger set to "on entry" run Filemaker script 1
  2. Filemaker script 1 sets the global field with the active tablename & "::" & active fieldmane and then sends an event to the AutoIT script to run. The event contains a few script parameters for the AutoIT script and as mentioned I store these in global fields in Filemaker but they could be hard coded into the send event script step too. The parameters tell the AutoIT script 1)whether to automatically search for the camera save directory or to use the location provided in the script parameter (auto should work in most cases), 2)how long to wait for a photo to be taken before it times out, 3)the FMP URL to send when a photo has been taken, and 4)optional flag that will show a popup message box at the end of the script with the full FMP URL returned (for debugging only).
  3. The AutoIT script opens the Windows camera and brings it to the front. The script is compiled to an exe so it can run without AutoIT. Testing indicates that the camera window is restored to it's last size and position which is good because it means that if you prefer the camera to be in only 1/4 of the screen, for instance, it will return there every time the camera is run.
  4. The AutoIT script then monitors the camera save directory for changes in the qty of files. As soon as a photo is taken it fetches the newest file name and minimizes the camera app. This could be changed to close the camera easily enough but minimizing is better for my use. I suppose I could just add another parameter and let Filemaker tell AutoIT whether to close or minimize the camera when done.
  5. The photo file path is appended to the FMP URL sent to the AutoIT script as a parameter in step 2 above and sent to Filemaker. This URL needs to include instructions for Filemaker to run FM script 2 and use the photo file path as a parameter.
  6. Filemaker script 2 sets the container table::field based on the address saved in the global field at step 2, with the photo file path returned as a parameter in the FMP URL. I am using set field into the container with the photo full path and not storing images in Filemaker but you can do whatever you want really once you have the photo full path in the Filemaker script.

All the components work and I'm just adding some extra error checking and plenty of comments to the AutoIT script so that if anyone else wants to use it they can do some debugging themselves (if needed). I haven't, and won't, be able to do much in the way of testing on other hardware/software combinations as I only have 2 identical tablets. But the AutoIT script uses methods that should pretty much work on any Windows 8.1 or 10 tablet with a camera, including the Surface Pros.

It's not as handy as "insert from device" for FM Go but it's my best attempt to get the same functionality on Windows tablet platform.  I thought I would post this here now and see if there is any interest in the solution. If so then I'll put a bit more effort into documenting everything and post it all here for other people's benefit. (caveat: might take a couple days)

Cheers!

Link to comment
Share on other sites

Hi, same problem here, but solved it by installing YAWCAM, which simply makes streamed video from an USB-camera and then broadcast it on an internal webserver (port 8888). From this, you simply capture an image with INSERT URL (localhost:8888) and DONE !

 

Good luck ;)

Link to comment
Share on other sites

Thanks Lape. That approach works if your application doesn't require very good image quality. 2MP max for standard HD stream and up to about 5MP with 4k, but without any ISO control, white balance, image stabilization, post processing, etc. It's certainly easier and good enough for some applications (especially where the hardware is on a permanent mount for stability). Unfortunately I needed full portability and reliably better quality images to be able to zoom into photos later on with reasonable detail. The camera hardware and software together on the Lenovo tablets is sort of just good enough to get by. It's no DSLR but certainly better than image capture from streaming video.

Still, its good to have both approaches in your tool kit!

Link to comment
Share on other sites

  • 9 months later...
  • Newbies

Hi, same problem

Is your offer ( I would post this here now and see if there is any interest in the solution. If so then I'll put a bit more effort into documenting everything and post it all here for other people's benefit) actual?

Sorry my englisch is not the best.

it would be greatfull if you can help me.

Thanks

Rico

Link to comment
Share on other sites

Rsputnik, my offer was serious 10 months ago. I got it all working back then but have had to move onto different projects now. As there didn't seam to be any interest I didn't bother documenting the solution to the point where anyone could pick it up and run with it. Sorry.

Link to comment
Share on other sites

  • Newbies

Hi onefish

thanks for your answer. No problem.

I have it done. But it ist not so comfortable as yours. I have to press a Button once more to bring the Fotos to the Container.

thank you 

greetings Rico

Link to comment
Share on other sites

This topic is 2710 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.