Fitness Unpersonal Trainer controlled by webCam

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Post Reply
mhw
*
Posts: 13
Joined: 19 Jan 2011, 18:42

Fitness Unpersonal Trainer controlled by webCam

Post by mhw »

Hi,
idea is simple: instead of pressing alternatively normal key and numpad key webCam could be used in extremely simple way - we have a camera snapshot of a background as reference and an actual snapshot from webcam and all we have to do is to compare both images to recognize an object entering and leaving monitored area.

I've made a rapid prototype:
1. set a cam to capture monitored area(i.e. tip of a dildo attached to something solid)
2. set http://sourceforge.net/projects/dorgem/ to automatically capture webCam snapshot to file cambridge_cam.jpg
3. copy a background snapshot as cambridge_ref.jpg
4. put http://www.nirsoft.net/utils/nircmd.html to directory with both images(used to emulate key presses)
5. extract my tool http://uploading.com/files/513a894d/camBridge.zip/ to the same directory
6. start CamBridge and start Fitness Unpersonal Trainer
7. CamBridge will emulate pressing key 'G' each time you will enter monitored area and '5' on numpad each time you'll disappear from camera range(so you can control Fitness Unpersonal Trainer i.e. by sucking a dildo )

Let me know if you like the idea and if you consider it useful.

you can edit commands executed when you enters/leaves monitored area in cambridge_eq.cmd and cambridge_df.cmd
Last edited by mhw on 06 Feb 2011, 09:58, edited 2 times in total.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Fitness Unpersonal Trainer controlled by webCam

Post by qwerty212 »

Sound pretty interesting.

Thanks for sharing!
User avatar
The Slinky
**
Posts: 131
Joined: 19 Jan 2011, 07:17
Location: south California

Re: Fitness Unpersonal Trainer controlled by webCam

Post by The Slinky »

This is also briliant. Does it work well with the fitness training software?
mhw
*
Posts: 13
Joined: 19 Jan 2011, 18:42

Re: Fitness Unpersonal Trainer controlled by webCam

Post by mhw »

Dorgem takes snapshots once a second and can't be set to take snapshots faster, so you can't set fitness trainer fast(3-4 seconds should work good).
Accuracy of detection of image changes depends on camera setup, light conditions and so on(major problem is that if you'll move some object in background it will stop recognizing situation when current snap is 'equal' to reference image).

I've checked it only on short test sessions(i.e. step forward, step back) and If above conditions are fulfilled it worked quite well - why don't you give it a try? :)

As i mentioned earlier it's just a quick assembly to checkout the idea, if it will be considered worth of more effort, i can add some configuration file to set a trigger value when snapshot is considered equal or different with a reference image or some kind of mechanism that would update reference image or perhaps you'll have some better ideas to increase it's performance.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Fitness Unpersonal Trainer controlled by webCam

Post by qwerty212 »

On other software I was working on (no selfbondage) I can look for a color inside of an area, so it can be possible to setup 2 webcams (one per every leg) and put an sticker (or something with a particullar colour) and force the camera to look for this colours, so if you do not exercise the colour will no be on the the searching area and you'll be teased... If I have enough time I'll include this in newer versions.

Once again thanks for the idea
mhw
*
Posts: 13
Joined: 19 Jan 2011, 18:42

Re: Fitness Unpersonal Trainer controlled by webCam

Post by mhw »

I was thinking about color recognition, but it work badly with insufficient light so it may cause problems with preparing a setup with good light conditions - we don't wan't to push users into technical issues after all. It's also worth to mention that camera set to record in gray scale works faster and gives better quality pictures even in bad light conditions.

Dorgem can be configured to grab 2 cameras snapshots into 2 separate images(dorgem /c:cam2), and CamBridge tool is written in such way that if you'll rename exe file it will start to work on files NEWNAME_cam.jpg NEWNAME_ref.jpg and so on so it can be simply copied with another name to work with 2 cameras(one uses command that sends main keyboard area key, other one sends numpad key only when object enters area and command executed when object leaves area remains empty)

I was thinking about another approach - additional file that would give a mask determining which parts of images should be compared, so we could put entire stepper into field of view of single camera and define 2(or more in future) mask images that would be i.e. black areas on white background and only parts of snapshot marked black on mask would be taken into consideration when snapshot would be compared with reference image so software would react separately on objects in particular areas of tracked scene.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Fitness Unpersonal Trainer controlled by webCam

Post by qwerty212 »

I'm afraid about the noize of the images. One selfbondager was asking for a release system filling up a bucket with a liquid and I've coded a little program that waits for a colour on an area of the screen and when this color apears (for example when you make the exercise or when you put something that floats inside the empty bucket) then the program can perform an operation (lets call this operation "press one key of the keyboard to stop the countdown of the Selfbondage Fitness Unpersonal Trainer")

You can find the post where I've posted this little program here: http://forum.boundanna.net/board/viewto ... f=6&t=4305

and a link to that program here: http://www.mediafire.com/?bu9x5m6onp2nawt

The program can be setup to work with two cameras, but I think that this can be very complicated for standar users (and the Fitness Unpersonal Trainer is complicated per se)

I think that a timer as second release method, sound teasing, random time option and random teasing can be very interesting and very easy to implement.
So you can use the program in the way that you have to fill a bucket with liquid to be free, or you have to arrive to one location wearing a t-shirt of a determinate color (who knows, doing the riding the office chair scenario or being tied lying in the floor...)

The program looks like that:
Image

Greets from Barcelona

(PS, at the moment the program looks for the colour every 2 seconds, it reduce the cpu usage a lot, so it is not instantly that you put the object in the searching area and it open the cd tray)
mhw
*
Posts: 13
Joined: 19 Jan 2011, 18:42

Re: Fitness Unpersonal Trainer controlled by webCam

Post by mhw »

Nice piece of software, works nicely,
however if you'll ever find a time to make next version i would add an option to execute a *.bat or *.cmd command instead of opening tray, so it would be much easier to make various "products" cooperate each other like pain.exe and exit.exe in fitness unpersonal trainer(by the way if it would be possible to put in FUT pain.cmd and exit.cmd with some custom commands(i.e. turning monitor on/of with nircmd tool) instead of *.exe files it would give much more ways to use it creatively).

It's possible to achieve same scenario with set from beginning of thread(dorgem+camBridge+nirCmd) by taking a image of empty bucket as background image, removing cmd file executed when object leaves area and modifying command called when object(floating on water when bucket is being filled) enters monitored area to open cd tray with nirCmd.

...and those masks i was talking about would be similar to rectangle in your application.
I'm still not sure if detecting if there's an object on given background(reference image) or searching of a particular color in monitored area would be better- perhaps it depends on setup and it both methods should be available. Anyway... it's long way to make a single application with capturing images from webCam and graphical interface that would be easy enough for standard users..
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Fitness Unpersonal Trainer controlled by webCam

Post by qwerty212 »

This program alredy runs "exit.exe" when the colour exists. It not just opens the CD Tray.

D'you mind to send to me by pm or post here your configuration? (this is the first time I post anything only having tested it on one computer).

About the color or the shape issue, we can also code the program to make a motion detection of the rectangle area... but what if the liquid passes through the rectangle when you're filling the bucket?

Possibilities are endless. By the moment I'll put a countdown as second release, the sound teasing option from the CD Tray Opener and will draw a scenario to see if anyone else finds this program helpful.

Ideas are welcomed.

Greets from Barcelona
iluvplanes1
*
Posts: 29
Joined: 03 Feb 2011, 22:37

Re: Fitness Unpersonal Trainer controlled by webCam

Post by iluvplanes1 »

mhw(or anyone else who can help)

I am trying to get this set up to work since it sounds great(thanks by the way to you and qwerty!). However, I am not having any luck. I have all the ness. files downloaded in one folder. I have a background image named cambridge_ref.jpg. Now do I also need to make another image named cambridge_cam.jpg or do I just set that as the AVI archive filename on dorgem? Also, is there anything I need to do with nircmd beside have them in the same folder as well? One last question, do I use the built-in webcam option in fitness trainer? Sorry for all the stupid questions. Thanks again!
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Fitness Unpersonal Trainer controlled by webCam

Post by qwerty212 »

There are not supid questions.

I can answer you with the built in camera issue. If you want to use the camera just to take photos of you while you are doing the exercise you can use it perfectly.

I use an Playstation' Eye Toy camera for my testings, but most of the cams do work (specially Logitech cameras)

Greets from Barcelona
iluvplanes1
*
Posts: 29
Joined: 03 Feb 2011, 22:37

Re: Fitness Unpersonal Trainer controlled by webCam

Post by iluvplanes1 »

Qwerty. Thanks for the response. I should have been more specific sorry but what I meant was do I need to have the webcam on through fitness trainer(the camera button on the bottom left) for mhw's program to work?
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Fitness Unpersonal Trainer controlled by webCam

Post by qwerty212 »

Ok, now I copy you. Well, mhw's programs are used just as inputs, so they might work fine even if you are using firefox.

What I'm afraid is about high cpu usage and if the camera feature on Fitness Unpersonal Trainer can disturb mhw's solution (same dll's in use or something like that).

We will have to wait to see what does he think about that.

Greets from Barcelona
mhw
*
Posts: 13
Joined: 19 Jan 2011, 18:42

Re: Fitness Unpersonal Trainer controlled by webCam

Post by mhw »

Hi,
nircmd just need to be present in directory - it's referred in command files cambridge_df.cmd and cambridge_eq.cmd(used to emulate key presses).
qwerty is right - fitness unpersonal trainer's camera feature can disturb this solution(dorgem to be specific), because of locked camera driver,
as far as i tested, cpu usage is rather low

And most important - cambridge_cam.jpg file
This should be generated by dorgem:
1 set up camera in dorgem (you can use preview to ensure everything is fine)
2 enter 'Store Settings'
3 Add a File entry and set it to cambridge_cam.jpg to be captured in 1 second interval
4 Close store settings and check 'Auto Capture' in main window
5 Leave dorgem in tray
this will cause that dorgem will generate cambridge_cam.jpg once a second with a snapshot from camera,
cambridge.exe just compares both files and executes cambridge_df.cmd /cambridge_eq.cmd command when images are equal or different.
Siezen
*
Posts: 4
Joined: 28 Jun 2014, 19:04

Re: Fitness Unpersonal Trainer controlled by webCam

Post by Siezen »

I really like the idea of personal trainer controlled by a webcam. This would allow a scenario where I'm forced to walk in high heels between 2 points in order to be released.

However, I can't access the cambridge file (needed to compare pictures). Would it be possible to post a new link?

Keep on the good work! Really appreciate all the effort!
Post Reply