Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Saving Energy Via Webcam-Based Meter Reading?

timothy posted more than 5 years ago | from the take-a-look-see-less-often dept.

Power 215

squoozer writes "Like many people, I am trying to cut down on the amount of energy my family and I use in order to save both the environment and my pay packet. Since I want to do this in as scientific a way as possible, I'm taking meter readings every day and recording them in a spreadsheet (OOo Calc naturally). Currently, in the UK at least, neither gas nor electricity meters can be hooked up to any sort of device that can query the meter for its current reading. Rather than climb down into the cellar every day to read the meters, it would be great if I could simply position a webcam in front of each meter and have the value logged automatically each day. The problem is that while I am a software developer (Java mostly) I have no experience in image processing (dials from the electricity meter) and don't really know where to start with this project." Does anyone have any advice for analyzing the visual data this reader would be gathering?

cancel ×

215 comments

I don't know if it's anything like in Canada (1)

Yvan256 (722131) | more than 5 years ago | (#25738755)

But you must not block the meter dials from view. Someone goes to check the values manually, every once in a while (monthly?).

If you have the same kind of "spinning wheel with a mark" under the small dials, it might be easier to check for the number of revolutions of that wheel.

Re:I don't know if it's anything like in Canada (1)

halcyon1234 (834388) | more than 5 years ago | (#25738841)

A note, I'm in Canada too, and maybe it's just the neighborhood I grew up in, but all the meters were on the outside of the house. I'm not sure how effective hooking a web-cam rig to the side of your house would be.

Also, since the OP says the meter is in the basement, I'm assuming low light. This means you'll need to light the meter every time you want to snap a photo of it-- or leave a light on all the time. I have to wonder what that would do to your hydro bill...?

Re:I don't know if it's anything like in Canada (1)

adonoman (624929) | more than 5 years ago | (#25738885)

It's easy enough to get webcam with efficient infrared LEDs that light up a small area.

Re:I don't know if it's anything like in Canada (0)

Anonymous Coward | more than 5 years ago | (#25739697)

National Instruments makes a software package called LabView that has an image processing package. The software itself is fairly expensive, but if you know someone who has it and knows how to use it, they can compile an executable for you.

You can find developers and other resources at the National Instruments website. (www.ni.com)

They may also have crippled demo packages but they aren't known for giving away the farm.

The software really is good though and is designed from the outset for instrument/machine control/query/process stuff. I know the image processing stuff would do what you want and probably very easily.

Re:I don't know if it's anything like in Canada (4, Insightful)

the_other_one (178565) | more than 5 years ago | (#25739183)

But you must not block the meter dials from view. Someone goes to check the values manually, every once in a while (monthly?).

If you have the same kind of "spinning wheel with a mark" under the small dials, it might be easier to check for the number of revolutions of that wheel.

Of course your biggest power drain will be from the computer that is always on reading the meter.

Re:I don't know if it's anything like in Canada (1)

negRo_slim (636783) | more than 5 years ago | (#25739637)

Of course your biggest power drain will be from the computer that is always on reading the meter.

I can see it now, a 1kw rig with 4 geforce cards, 32 monitor, 800 watt stereo, lit up like the sun with ever light and fan this side of new egg... all just to read the power meter.

Re:I don't know if it's anything like in Canada (2, Interesting)

jkerman (74317) | more than 5 years ago | (#25739677)

They changed all our electricity meters (madison, WI) to wireless now. they just drive the truck by and read them all instantly.

I assume it would be getting popular elsewhere too. it would be fun if you could tap into that.....

Current reading? (3, Funny)

Hatta (162192) | more than 5 years ago | (#25738767)

My meter reads in kilowatt hours, not amperes.

Re:Current reading? (1)

frooddude (148993) | more than 5 years ago | (#25738891)

Yes, Current reading. As in the reading currently or at the present time.

Re:Current reading? (1)

randyest (589159) | more than 5 years ago | (#25738929)

Where did he say "current" reading? "Currently,..." is not a unit in this usage, and even his image shows kWh. Or were you being "funny?"

Re:Current reading? (1)

Hatta (162192) | more than 5 years ago | (#25739221)

Currently, in the UK at least, neither gas nor electricity meters can be hooked up to any sort of device that can query the meter for it's current reading.

Yes, this was an attempt at humor on my part. I see that I failed.

Re:Current reading? (-1, Troll)

Anonymous Coward | more than 5 years ago | (#25738935)

MY meter reads in Niggawatts! Beat that

Re:Current reading? (1)

MiniMike (234881) | more than 5 years ago | (#25739017)

Your forgot to call him an insensitive clod.

Re:Current reading? (1)

Enleth (947766) | more than 5 years ago | (#25739225)

Are you sure you aren't one of those animal rights activists that come out with a protest every time someone starts a debate about a public right to bear arms?...

Re:Current reading? (2, Funny)

Billhead (842510) | more than 5 years ago | (#25739875)

Don't you mean to arm bears?

Hi! I'm facing a similar problem. (0)

Anonymous Coward | more than 5 years ago | (#25738797)

I need to capture alphanumeric digits in a captcha for my spam business. Please give me all the tips you have on this subject.

Thank you!
vc: bombed

Re:Hi! I'm facing a similar problem. (1)

Ethanol-fueled (1125189) | more than 5 years ago | (#25739549)

...as if webcams are more efficient than software screen captures...

what's your goal? (4, Insightful)

gEvil (beta) (945888) | more than 5 years ago | (#25738807)

I'd say your approach completely depends on your goal. If your goal is as stated, then I'd use the webcams to get shots of the meters, then I'd take the 2-3 minutes or whatever it takes a week to pull up those images and transcribe their values into the spreadsheet. If the goal is a programming exercise, then go to town with figuring out some way to automate that few-minutes-a-week task. Of course, in order to do that, you'll expend a whole lot more energy than you'd take to read the meters (via the webcam shots) yourself.

Re:what's your goal? (2, Funny)

greg_barton (5551) | more than 5 years ago | (#25739165)

Of course, in order to do that, you'll expend a whole lot more energy than you'd take to read the meters (via the webcam shots) yourself.

You are hereby ordered to report to the home office and turn in your geek card.

Re:what's your goal? (1)

Erioll (229536) | more than 5 years ago | (#25739301)

Not to mention that if he's trying to SAVE energy, how much energy is the webcam + computer hooked up to watch this thing consuming?

Re:what's your goal? (1)

gEvil (beta) (945888) | more than 5 years ago | (#25739309)

Well, once he gets his contraption set up, he can find out!

Re:what's your goal? (2, Insightful)

jibjibjib (889679) | more than 5 years ago | (#25739743)

He probably has a computer running all the time anyway. And a webcam presumably doesn't consume much power, especially if it's turned off most of the time and just wakes up occasionally to grab a single frame.

Re:what's your goal? (1)

kv9 (697238) | more than 5 years ago | (#25739995)

Not to mention that if he's trying to SAVE energy, how much energy is the webcam + computer hooked up to watch this thing consuming?

whenever I hear of these power saving hippies I chuckle and try to throw another server in my power guzzling rack. to balance things out.

Re:what's your goal? (0)

Anonymous Coward | more than 5 years ago | (#25739465)

You sound like my wife. Right after I have a well designed system to automate some task, she has the audacity to tell me what the time/benefit ratio to engineering it would be and dash my dreams.

Re:what's your goal? (1)

crevistontj (1032976) | more than 5 years ago | (#25739817)

Agreed. What a stupid waste of effort, unless you're just looking for a practicum. Brains are still a lot more efficient for a lot of tasks than a computer is or will be in the next n years. Just go downstairs and look at the damn meter once a day. Or put a webcam there and save a screenshot each day and spend the 1 minute per month logging the value from the pics. How long does it take to look at a picture of a number and write the number down? 3 seconds? Even if you managed to code the entire thing, start to finish, in one week, it would take you 131 years to break even on man-hours for this project.

Simple solution (5, Funny)

halcyon1234 (834388) | more than 5 years ago | (#25738811)

Post the images as CAPTCHAs that protect porn pictures. You'll have the values typed in for you in no time.

Re:Simple solution (1, Funny)

Anonymous Coward | more than 5 years ago | (#25739433)

I'll volunteer to transcribe them for you. .. exactly what kind of images were they? Resolution?

Possible Implementation (2, Insightful)

orclevegam (940336) | more than 5 years ago | (#25738815)

Depending on the color of the faceplate and the hand, you might be able to mask off everything you don't care about (say everything but a small area around the center of the dial), run it through a hi/low filter to map the faceplate to white and the hand to black, and then just calculate the angle of the hand by searching the edge of the image for black pixels. So long as the cam is fixed and you know the coordinates of the pivot point it should be trivially easy to determine the angle of the hand based on the point at which it crosses the edge of the detection area. Once you've got the angle it should be trivially easy to map that back to a set of values.

Re:Possible Implementation (0)

Anonymous Coward | more than 5 years ago | (#25739885)

Holy crap, someone actually answered his question.

Re:Possible Implementation (1)

SQLGuru (980662) | more than 5 years ago | (#25740019)

The position of everything should be the same each time. Convert to black & white (not greyscale). Then, because the center positions are known and the position of each number, figure out which "wedge" the point falls into. A wedge is defined as starting with a number and proceeding to the next (like the hour hand in a clock).

You can compute the coordinates of the wedge ahead of time. I would probably AND/OR the wedge from the picture with a known wedge to quickly compare them.

0 indicates "filled" (color = black, or 0x0), . indicates "empty" (color = white, or 0x1)

Check wedge
0000 .00. ....

Test wedge A (arrow not in wedge) .... .... ....

Test wedge B (arrow partially in wedge)

000.
00.. ....

Check wedge & Test wedge A .... .... ....

(all white)

Check wedge & Test wedge B
000. .0.. ....

(not all white)

That should give you two possible wedges at most. You can either fudge it (quick) or you can do detailed checking to see which wedge to indicate. Repeat the process for each dial. Record the number. I don't know the graphics libraries for Java, but as long as they are similar in capability to those of .Net (I assume they are), then it should be a couple of hours to implement and work out the major kinks (it isn't that I can't code in Java, but that I haven't had to do any graphics processing in Java).

There's probably even some DirectX or OpenGL functions that you can use to do the masking even faster.....but again, I don't know them off the top of my head.

Layne

this is lame (-1, Troll)

Anonymous Coward | more than 5 years ago | (#25738817)

Dear slashdot,

like so many others, I have a project i want to do. the project involves doing X, but alas I can not do X myself. are there any slashdotters out there who could do X for me?

regards,

someGuyPosingAsAGeek

Re:this is lame (2, Insightful)

networkBoy (774728) | more than 5 years ago | (#25738999)

Dear /.

Like so many others, I have a project I want to do. The project involves doing X, but alas I can not do X myself. Have any other /.ers done this and have some sample code I can look at and learn how to do this myself?

regards,

someGuyWhoWantsToBeABetterGeek

Re:this is lame (3, Insightful)

joshuac (53492) | more than 5 years ago | (#25739479)

How is it lame to ask other people questions when learning how to do something yourself?

well (1)

amnezick (1253408) | more than 5 years ago | (#25738821)

If it's digital I don't see any problems (except maybe proper lighting unless using an IR camera) but if it has dials I see a problem if it's somewhere between two digits.

There are a few tutorials on the net about image-processing (some very interesting using ANNs[artificial neural networks])

Re:well (1)

randyest (589159) | more than 5 years ago | (#25738977)

It's not digital in his case. Check the jpg in the summary -- it's one of those 5 clock-face things with 0-10 clocks for 10, 100, 1e4, 1e5, etc. decimal positions.

Rubbish (3, Informative)

megalomaniacs4u (199468) | more than 5 years ago | (#25738827)

in the UK at least, neither gas nor electricity meters can be hooked up to any sort of device that can query the meter for it's current reading.

Rubbish. Look up smart meters gas & electric meters which update the utility company continously on usage which they can provide to you as well. (currently insanely popular after the recent documentry on smart meters)

If your supplier is reluctant to include you in the trials, for electrical use try "Wattson" [diykyoto.com] or other similar personal wireless power meters (also sold out everywhere, but there a cheaper more functional equivalents around)

Re:Rubbish (2, Informative)

camperdave (969942) | more than 5 years ago | (#25739613)

You have to clip a Wattson transmitter around a single line of the power feed from the pole into the fuse box. Most places I've seen have these wires in a conduit leading from the meter to the fuse panel. In order to clamp it appropriately, you'd need to install the transmitter inside the fuse panel itself. This is not recommended, and may be illegal in certain regions unless you're a licenced electrician.

Kill-A-Watt? (3, Informative)

corsec67 (627446) | more than 5 years ago | (#25738833)

A Kill-A-Watt [thinkgeek.com] might be a better choice for "power trimming", since you can get an instant reading of the power used by anything that plugs in.

On my website [phot.ogra.ph] I have a couple of webcams that I grab the image from at a specific interval and store the result. Basically, if you get a Trendnet TV-IP201 and a Pentax 10mm f/1.2 [bhphotovideo.com] lens with a C-mount to CS-mount [bhphotovideo.com] adapter, you can just wget the image however often you want. Image processing is another issue, but I don't know anything about that.

Re:Kill-A-Watt? (0)

Anonymous Coward | more than 5 years ago | (#25738953)

Yes, spend 200+ bucks in equipment so that you can save 20 bucks! That's the answer!

Re:Kill-A-Watt? (0)

Anonymous Coward | more than 5 years ago | (#25739027)

That would have a net gain in under a year...

Re:Kill-A-Watt? (1)

corsec67 (627446) | more than 5 years ago | (#25739159)

Yes, spend 200+ bucks in equipment so that you can save 20 bucks! That's the answer!

Hence my suggestion of the $25 Kill-A-Watt.
It seems like he wants to monitor the whole house, make some change, see how that affects the power usage over a day, and repeat. That seems like a really annoying thing to do, so my idea was to measure everything with the Kill-A-Watt directly, and then he would know what all of the "little things" used each, how much they draw when in standby, etc. It doesn't help with big things like a furnace or whole house air conditioner, but that isn't going to be easy to fix unless he can tolerate a colder or warmer house, anyways.

Re:Kill-A-Watt? (0)

Anonymous Coward | more than 5 years ago | (#25740061)

A Kill-A-Watt might be a better choice for "power trimming", since you can get an instant reading of the power used by anything that plugs in.

I agree that measuring each device is far more informative than whole house monitoring. My UPS displays current draw via its management software, so that might be a free alternative for some people. I have no idea how well it deals with things like power factors and you should never run inductive loads off a UPS (dish washer, fridge, washing machine, A/C, etc).

The standards are coming (some already here) (4, Informative)

randyest (589159) | more than 5 years ago | (#25738851)

Your power company is probably already looking into standards like Homeplug (main org site) [homeplug.org] (wiki link [wikipedia.org] ) that provide meter data much more accurately than a webcam and image analysis software. This allows them to save money on paying sneaker-net meter readers, and real-time usage data for load balancing and prediction.

Whether or not they'll specifically give you access to the data is somewhat moot, since it's network-over-powerline and there are already consumer devices [google.com] that can access the same network and (eventually if not already) be hacked to reveal the data being sent from your meter.

It's an exploding industry (like 20-30% CAGR in the US alone, higher in other less-developed areas where the first power meters will be homeplug-capable) so I wouldn't suggest putting too much effort into your image-analysis idea at least for a few months to see what happens in homeplug-world.

Re:The standards are coming (some already here) (0)

Anonymous Coward | more than 5 years ago | (#25739715)

Ameren finished switching everyone in the St. Louis, MO, USA metro area to remote-read electric meters about 10 years ago. I think it's probably safe to assume that their entire service area is handled this way by now.

Their service area is approximately 30% of Missouri and 60% of Illinois. (See here: http://www.ameren.com/AboutUs/ADC_ServiceMap.asp [ameren.com] )

OCR plugins? (2, Informative)

phatvw (996438) | more than 5 years ago | (#25738865)

There are many open source OCR [linuxappfinder.com] tools available. Write a script to capture [linux.com] a JPG or PNG image every day from your camera and run it through one of the command-line OCR tools..

As long as your web cam doesn't get moved, you can set static cropping on the image so only the numbers are in the jpg file without a huge complicated border than might confuse the OCR engine.

Re:OCR plugins? (2, Informative)

randyest (589159) | more than 5 years ago | (#25739029)

Cool. Which one of those can decode the five 10-position analog dials (like clock faces) that he shows in the jog in the summary?

Re:OCR plugins? (1)

phatvw (996438) | more than 5 years ago | (#25739277)

You know what, I hope somebody mods my parent comment down. I didn't specifically say how to solve the problem. I really don't know the best way to do this, it would certainly help if the needles were a different colour than the rest of the image. Then you could just compute the angles and relative postition of the needles. Given that data, its a piece of cake.

Going the OCR route is actually quite a bit more complicated. You'd basically have to train the OCR to recognize the dial pattern and what a "5" might look like. a "5" might have the needle just before the 5, on top of the 5, or just past the 5.

You could also figure out which pie slice of the circle has the most black space. So split the circle into 10 36-degree segments and add up all the black pixels. The one with the most black is likely the one with the needle. Or course you have to take into account corner cases, so some testing is necessary. And of course comparing to the preceding place value and past data points to make sure it all makes sense.

Re:OCR plugins? (1)

phatvw (996438) | more than 5 years ago | (#25739321)

Bah forget all that. Smart meters are the way to go. Problem solved.

Of course only the true nerds look for the programming solution when there are much easier options around... but this is slashdot so I feel proud, not ashamed :)

Re:OCR plugins? (4, Informative)

smellsofbikes (890263) | more than 5 years ago | (#25739367)

This guy [eissq.com] has an algorithm run in matlab to convert dial indicator readings to numbers using MatLab. He claims 99% accuracy over 2000 readings.

Re:OCR plugins? (1)

YrWrstNtmr (564987) | more than 5 years ago | (#25739611)

You could also figure out which pie slice of the circle has the most black space. So split the circle into 10 36-degree segments and add up all the black pixels.

Even simpler:
Split the pic of each dial into the 10 segments.
Compare today's pic segments with the stored segments.
Whichever 1 or 2 segments checksum 'different' than the stored, that's where the pointer is.

Re:OCR plugins? (1)

jibjibjib (889679) | more than 5 years ago | (#25739829)

Checksums don't work for comparing photos, because two photos of the same object won't be identical, due to random fluctuations in the CCD sensor and slight changes in lighting.

(Although there are algorithms which actually will work, so your idea is good, it's just the 'checksum' part that's not quite right.)

Re:OCR plugins? (1)

mobby_6kl (668092) | more than 5 years ago | (#25739767)

The first thing that came to my mind was OCR too; obviously I also didn't click the link :). Of course everything would've been much simpler if we were dealing with an odometer-type device here.

The sample image should work just fine even in gray-scale. The contrast is high and the needles are pretty large, so it should be reasonably easy for anyone to just get the angle of each one and calculate the value based on that, exactly as you suggest here. One could also hardcode in the areas in which each dial is located to further simplify things. Someone with experience in computer vision could probably write everything from scratch, and there are several computer vision libraries [google.com] available for everyone else.

Re:OCR plugins? (1)

smellsofbikes (890263) | more than 5 years ago | (#25739279)

I've tried using some opensource OCR programs, most notably Kooka OCR. What I was doing was (I think) the best possible situation: putting a digital multimeter with a very large readout panel face-down on a flatbed scanner and automatically scanning it and dumping the output to Kooka. It does a pretty terrible job, honestly. I'm lucky to get one digit correct half the time, out of the three digits available.
I'm doing cropping to make sure only the digits I want are in the frame.
If you have any suggestions for better OCR programs, I'd love to hear them. I'm really annoyed by this, because my girlfriend's HP flatbed scanner has OCR software from 1998 that came (apparently free) with the scanner, that has better than 95% accuracy on an entire printed page, at an angle to the scanner. Windows-only, of course.

Re:OCR plugins? (1)

jibjibjib (889679) | more than 5 years ago | (#25739867)

I assume your digital multimeter has 7-segment displays. Perhaps the OCR software wasn't designed with that sort of thing in mind at all, but works much better with printed text.

Touchy, feely. (1)

Ostracus (1354233) | more than 5 years ago | (#25738881)

"Saving Energy via Web-Cam Based Meter Reading? "

I'd put an induction clamp onto the line in my box and get the data from that point.

Re:Touchy, feely. (1)

dschuetz (10924) | more than 5 years ago | (#25738971)

I'd put an induction clamp onto the line in my box and get the data from that point.

Hard to do that with Gas, though.

Plus, you'd have to measure the main (not impossible, but it might be harder to find a clamp-on inductive ammeter that's easy to interface with a computer), and you'd have to monitor it *continuously* in order to integrate over time. Whereas the webcam can even sit powered off for most of the day, and just be activated long enough to grab an image of the dials.

Re:Touchy, feely. (1)

mpsheppa (1088477) | more than 5 years ago | (#25739511)

I'd put an induction clamp onto the line in my box and get the data from that point.

Hard to do that with Gas, though.

Plus, you'd have to measure the main (not impossible, but it might be harder to find a clamp-on inductive ammeter that's easy to interface with a computer), and you'd have to monitor it *continuously* in order to integrate over time. Whereas the webcam can even sit powered off for most of the day, and just be activated long enough to grab an image of the dials.

Even worse that that, you won't even get the correct result because of power factor effects.

Do what the meter supoorts? (4, Interesting)

bugg (65930) | more than 5 years ago | (#25738895)

Often the meter supports some sort of data export mechanism, and you just need to tie into it. Hacker extraordinaire Poul-Henning Kamp did this with his gas meter. [freebsd.dk]

Re:Do what the meter supoorts? (1)

phkhd (172530) | more than 5 years ago | (#25739667)

I've heard that many residential electric meters have ERT enabled meters [itron.com] , which use a custom wireless protocol, so that the guys don't have to get out of the truck to read your meter. So, you'll need some sort of radio, and then hack the protocol (maybe sombody already has?) [uri.edu] .

ding- electric meters already do infrared pulses (1)

SuperBanana (662181) | more than 5 years ago | (#25739903)

My electric meter (and most everyone else's by now) uses pulses of IR light. The transmitter is either pointed upwards, or out the face. The blink pattern is very simple to decode; it's basically 1 blink per energy unit (I forget how much.)

I have a wireless power meter I bought through the power company which uses the blinks to show me how much energy I'm using. The only downside was that it was a royal, complete, and total fucking pain in the ass to get the receiver's sensor positioned correctly. The sensor's sensitivity is so bad, it has to be positioned very, very precisely.

Google is your friend. (0)

Anonymous Coward | more than 5 years ago | (#25738913)

I found this lower down, since it's IR, you can probably achieve the same thing with a web cam.

http://hackaday.com/2007/05/30/uk-power-meter-monitor/ [hackaday.com]

Check for WiFi (1)

RingDev (879105) | more than 5 years ago | (#25738975)

The labor costs of checking meters is pretty significant to utility companies. One thing many municipality companies are trying is WiFi enabled meters that will report consumption to a meter truck as it drives down the street, saving hours apon hours of labor every day.

I haven't tried to tap into my own meter, but if they can read it, with sufficient time and effort I'm sure most of the readers of /. could read it as well.

-Rick

Re:Check for WiFi (1)

andrewd18 (989408) | more than 5 years ago | (#25739615)

saving hours apon hours of labor every day

Unfortunately, the Grammar Nazis shall never be able to share in this victory.

Re:Check for WiFi (2, Interesting)

jkerman (74317) | more than 5 years ago | (#25739731)

they are wireless, but not wifi

Current Transformers (0)

Anonymous Coward | more than 5 years ago | (#25739039)

Use a networked microcontroller connected to current transformers. That way, you could keep a nice log without even having to bother with image processing. A tiny uC could take care of all the ADC, and a Lantronix module could serve it to your network.

Python. (1)

Markimedes (1292762) | more than 5 years ago | (#25739063)

The "pygame" library in Python has a surfarray class that allows you to parse images as arrays.

Convert the image to black and white, with a tolerance level above the black of the circle and below the black of the dials.

Then you'll just have dials, so do a vertical scan then a horizontal scan.. whichever point has the least black pixels in common between both scans is the tip of the dial. Whichever has the most black points in common is the center of the dial.

Draw a line between those two points, measure the angle. Gotcha.

Prolly to complicated but i'd do it.. it would be a fun project.

ImageJ (1)

Don't Hate (1406025) | more than 5 years ago | (#25739093)

Use ImageJ! It's free, JAVA based and easy.

Re:ImageJ (1)

Don't Hate (1406025) | more than 5 years ago | (#25739181)

http://rsbweb.nih.gov/ij/ [nih.gov] I suggest that you threshold the image. Then you can detect where the pointers are within the image. From that information you could then find the values of each dial.

Clamp on ammeters? (1)

wfstanle (1188751) | more than 5 years ago | (#25739101)

I don't know if it is possible but can a ammeter that just goes around one of the conductors be adapted for this purpose? I used to work in the plating industry and we had something we called tong testers. It measured the amps at various points in the system. The beauty was that there was no physical connection with the conductors (I think it measured the magnetic flux that was created.). It might only work with DC. I am sure that there are some electrical engineers that know about such devices. What say you, could this work?

Re:Clamp on ammeters? (0)

Anonymous Coward | more than 5 years ago | (#25739939)

Those devices are called "current transducers", and they come in a variety of shapes and sizes.

When I worked for an HVAC controls contractor, we used CT's from Veris Industries [veris.com] .

The common types were anywhere from $20 to $100 each, depending on features, and that was back before the price of copper went through the roof. Also, they're designed to work with building automation systems, so they return either a 4-20mA signal (at 5V) or a 0-20V signal (at 20mA). You'll need some kind of PLC to read that input.

ImageJ (0)

Anonymous Coward | more than 5 years ago | (#25739125)

Lots of tools for Java image analysis in ImageJ - http://rsbweb.nih.gov/ij/

Source & docs are there too

I am a bioengineer not a programmer, but have had a to do a fair bit of automated image analysis, and it's a great resource for useful software parts.

Start Easy (0)

Anonymous Coward | more than 5 years ago | (#25739145)

take the pictures, and do human-OCR yourself when you want to look at the data.

Blue Line Innovations PowerCost Monitor (1)

sdpinpdx (66786) | more than 5 years ago | (#25739167)

I saw this [amazon.com] on This Old House a while ago. I don't see a way to snarf it out into a spreadsheet automatically, but it brings the data to you wirelessly and logs/aggregates some of it for a while.

drarenij@iro.umontreal.ca (0)

Anonymous Coward | more than 5 years ago | (#25739265)

if the meter is digital it's easy:

-put the camera in a fronto-parallel position w.r.t the meter.

-identify, by hand, the bounding box of each digit.
-proceed to a learning stage, by acquiring images of the 10 digits (0..9).
-After removing image's noise, your problem reduces to: read each digit and compare it to your databse you have learned earlier.

Need a different approach (1)

Tilzs (959354) | more than 5 years ago | (#25739281)

Forget the OCR, you need to just monitor the lowest ticks of the meter. Monitor when the dial makes a complete revolution and you can base all your calculations off of that. I believe this meter is different than yours but it may give you some ideas. http://www.btinternet.com/~jon00/electmon.shtml [btinternet.com]

One small problem (2, Funny)

YrWrstNtmr (564987) | more than 5 years ago | (#25739299)

Since you are talking about a webcam, that currently means USB. Your spouse will likely throw a fit about yet another set of wires trailing around the house. So unless you intend to splash out for a fully wireless (and expensive, in cost and 24x7 power) camera setup, my suggestion is to abandon this idea completely.

For the sake of your family sanity.

One approach... (0)

Anonymous Coward | more than 5 years ago | (#25739341)

What you would do is first segment out all the dials, so that you have a separate image for each of them - this would be easy to do, given that you are using a webcam - just define the rectangles (bounding boxes) that surround the dials, and clip each from the image. Next, convert each of the dial images to gray scale, and threshold - convert to just two values, black and white - using a dividing value that will eliminate just about all but the dial pointer. Then, find the angle the pointer makes with horizontal (or vertical). That will give you one half of the answer, then determine (via the center of pixels representing the pointer) whether you are on one side of your horizon or the other. From this, you can assign a value. Rinse and repeat.

Did that solve the homework? It's really a simple problem...

Ironic (0)

Anonymous Coward | more than 5 years ago | (#25739397)

Does anyone else find it ironic that he's concerned about his energy usage and that his solution involves using more energy?

There are better ways (0)

Anonymous Coward | more than 5 years ago | (#25739401)

There are power transducers like these:
http://www.crmagnetics.com/newprod/power_transducers.htm

The smaller ones have RS485 digital outputs so you can directly read out voltages, currents, active power and reactive power, frequency etc etc, but are limited to 25A for each of the three phases, so you need multiple transducers and sum up afterwards. Up to 16 transducers can use the same RS485 bus.

The larger ones have analog outputs 4-20mA or 0-10V proportial to the active power. You'd need an ADC in order to get your readings.

Without proper education you really should call an Electrician for installation.

Image processing problem (0)

Anonymous Coward | more than 5 years ago | (#25739437)

As others have suggested, ImageJ is a good place to start. You could easily place multiple Regions of Interest (ROI's) around each dial, and output the pixel intensity of each. When the needle passes through a ROI, the pixel intensity will drop, since the needle is black. The readout will be a bit coarse, but should be sufficient for your needs. You can then take the results from each image, and translate those values using simple logic checks into digital numbers.

split core CT or ammeter the way to go (0)

Anonymous Coward | more than 5 years ago | (#25739439)

You'd probably be better off putting a split-core current transformer around one of the mains coming into your breaker panel, then using some kind of data logging multimeter to log the output. A quick search turned up this for $90, it's almost exactly what you'd need, PC interface too! If you could find a version of that with the ammeter clamp detachable from the body, you'd be set.

http://www.wescotools.com/p-6812-1000a-data-logging-clamp-on-multimeter-trms.aspx

Orientation analysis in an image (3, Informative)

kebes (861706) | more than 5 years ago | (#25739467)

The image analysis question is interesting. You are trying to read dial positions, so conventional OCR is probably useless (unless there is a package to do exactly that?).

What you can do is use image processing commands (in your favorite programming language; a shell script, Python, etc.) to crop the image to generate a small image for each dial. Then convert to grayscale (and maybe increase the contrast to highlight the dial). To then calculate the preferred orientation in the image, you calculate gradients along different directions. There will be a much higher value for the gradient along directions perpendicular to the preferred axis. This procedure is described very briefly in this paper:
Harrison, C.; Cheng, Z.; Sethuraman, S.; Huse, D. A.; Chaikin, P. M.; Vega, D. A.; Sebastian, J. M.; Register, R. A.; Adamson, D. H. "Dynamics of pattern coarsening in a two-dimensional smectic system [aps.org] " Physical Review E 2002, 66, (1), 011706. DOI: 10.1103/PhysRevE.66.011706 [doi.org]

This is easiest to do if you use a graphics package that has directional gradients built-in (but coding it yourself probably wouldn't be too hard). Basically you create copies of the image and on one you do a differentiation in the x-direction, and for the other one a differentiation in the y-direction. Let's call these images DIFX and DIFY. Then you compose two new images:
NUMERATOR = 2*DIFX*DIFY
DENOMINATOR = DIFX^2-DIFY^2

Then you calculate a final image:
ANGLES = atan2( NUMERATOR, DENOMINATOR )

(All the above calculations are done in a pixel-by-pixel mode.) The final image will have an angle map (with values between -pi to pi) for the image. It should be easy to then use the avg or max over that image to pull out the preferred direction. You may also improve results by tweaking the initial thresholding, or by adding an initial "Sharpen Edges" step, or by blurring the NUMERATOR and DENOMINATOR images slightly before doing the next step.

In any case, the above procedure has worked for me when coding image analysis for orientation throughout an image (coding was done in Igor Pro [wavemetrics.com] in my case). So maybe it is useful for you.

Power saving tip (1)

myxiplx (906307) | more than 5 years ago | (#25739605)

Here's a crazy idea: TURN OFF THE CAMERA AND COMPUTERS!!

Seriously, is it really that hard to read the meter every once in a while?

One solution. (1)

harrkev (623093) | more than 5 years ago | (#25739639)

Here is my take on this ... for what it's worth.

Rigidly mount the camera in front of it, and use some constant lighting. You want everything to be the same. Note that the light can be off, except when you want a reading.

Take a bunch of baseline readings, as many as possible. Combine these using Gimp or Photoshop to edit out the dial needles (assuming analog needles). If your meter is anything like older US meters, the needles on the left will hardly budge. No problem. Ignore the left-most digits and concentrate on the right-most digits.

At this point, you have an image without needles, and you can take an image with the current reading. Make sure both images have the same brightness, and subtract the images. At this point, you can convert this gray-scale difference into a one-bit image easily enough. You might even want to eliminate any "on" pixel not connected to another "on" pixel to eliminate noise. The needles should pop out like crazy. This data should be easy to process. You have a couple of options.

First, would be to find the centroid of the blobs, and then computer the direction to the centroid from the base of the needle (since you mounted the camera rigidly, you should know the pixel coordinates of the needle bases). Some simple trig, and you have the angle. Some simple algebra to get the number.

The second option would be to somehow compute the actual line. I can imagine taking each point of the blob as a data point, and using basic statistics (least squares) to find the angle. Of course, this may blow up when the needle is vertical, so you also do a least squares on the transpose of your data, and take the better number. This will only give you an angle. Since rotating the needle 180 degrees will still result in the same angle, you will have to fall back on centroids. to possibly add/subtract 180 degrees as needed.

To summarize, not too conceptually difficult, but a time-consuming pain in the butt. I hope this helps.

Use a database (1)

sugarmotor (621907) | more than 5 years ago | (#25739641)

Once you have your OCR working, I think you should use a database to store the data, not a OO Spreadsheet.

sqlite might be the easiest.

Stephan

TED The Energy Detective (1)

mea_culpa (145339) | more than 5 years ago | (#25739647)

This [theenergydetective.com] along with the Computer Interface [theenergydetective.com] will be much more reliable. It is sophisticated enough to learn what appliances turn on and for how long and breaks down the usage detail for each.

This does require opening your breaker box and installing a loop around the incoming hot lines. This can kill you if you do not know what you are doing. If you are not familiar with working in hot boxes I recommend having an electrician install it.

My utility provides a box [srpnet.com] with a smart card that shows real time power usage, balance left on the card and approximate minutes until disconnect. Check with your utility for something similar. I like it much more than the monthly bill.

Apple ? (1)

detnyre (1406055) | more than 5 years ago | (#25739689)

If you have a Mac with OS X you could have a webcam take a picture and save it to a particular folder. Then have a worklow in place that automatically takes the image of the meter, adds it to an email and sends it to you. You could then receive the email, see the picture and replay back with the meter reading typed in. You could then have another workflow that monitors for the reply email, copies the meter reading from it and then opens the excel and copies the value to the spreadsheet. This would take some "fooling around" to get right, but would not be that bad to do...

captcha (0)

Anonymous Coward | more than 5 years ago | (#25739701)

Build a little porn website and use the images as captchas. Someone will read the meter for you :-)
 

How does this data help you? (1)

Lord Byron II (671689) | more than 5 years ago | (#25739735)

I have a problem with the premise of your question - how would this data help you? Obviously, it could tell you how much you're saving, but whether or not you're being efficient is simply a factor of how many things you have plugged in at a time.

This method also won't tell you which devices/appliances are the ones sucking the most juice. This is where a Kill-A-Watt can come in handy.

I recently trimmed my energy usage by:

-dialing up (or down) the thermostats - a/c, water heater, fridge
-switched to CF light bulbs
-used Kill-A-Watt on my computer equipment*
-started regularly changing my air filter in my furnace
-started using cold water for the clothes washer, and a low-temp setting for the dryer

*The Kill-A-Watt showed me that turning off my laser printer when I wasn't using it was worth $20/yr. Turning off my subwoofer when I wasn't watching a movie was another $20/yr. Turning off my cable modem and router at night is a few bucks/yr.

Mechanical? (2, Informative)

SuicidalLabRat (804152) | more than 5 years ago | (#25739761)

Mechanical or Spinning disk type meters can be read optically or magnetically, or if you have a dig meter with LED interface you can monitor the LED frequency; Both allow for real time monitoring of your homes load. Monitoring the aggregate by collecting at all load points would be better, but that's a bit more complicated. try: http://web.archive.org/web/20060509092108/http://www.seanadams.com/pge/ [archive.org] ...for a head start. SLR-

use RoboRealm free machine vision software (0)

Anonymous Coward | more than 5 years ago | (#25739835)

take a look at the RoboRealm free machine vision program [roborealm.com] . It's very simple to use. Also do a google search for "OpenCV" for a more robust vision platform.

Mechanical Turk (0)

Anonymous Coward | more than 5 years ago | (#25739869)

Mechanical Turk. Post the pictures and let people transcribe them for you.

A watt meter could help (1)

coolsnowmen (695297) | more than 5 years ago | (#25739881)

Buy a killawatt or any other watt meter.

http://www.amazon.com/gp/search?&index=electronics&keywords=kill%20a%20watt&_encoding=UTF8 [amazon.com]

I found out that all of my speakers (computer speakers / external tv speakers) drain 5 watts when they are off (but pluged in). I through them on a power strip. It is not much, but everything adds up.
With 2 sets of speakers: .14$/kWh * .010kW * 24h/d * 365d/year = 12$ a year

Find the pins (0)

Anonymous Coward | more than 5 years ago | (#25739919)

Looking at the picture I would think the simplest place to start would be to process each pixel in the image looking for the pins at the centre of each dial (they all appear to be a different colour to the rest of the image so this should be easy).

After this it should be simple to read a circle around each of these points just far enough to be outside the central black hub but not as far out as the text (you don't care about the text just the position of the dials). By finding the middle of the black area returned by this circle you will have the position of the dial.

One way to do it (0)

Anonymous Coward | more than 5 years ago | (#25739955)

This can be pretty easy if the camera location is fixed and you can count on the dials being in the same part of the picture every time.

- Take a picture and note the pixels that define rectangles containing each dial.

- Set a threshold and turn the image into a binary black/white image so that the background is white and the dial (and numbers and circle) are black.

- Create a 'test dial arm', the same size and shape as an actual dial.

- Put the 'test dial' in the center of each rectangle and rotate it around in whatever increment you like (36 degrees would give a resolution of 0.1 on each dial).

- At each position, calculate the amount of overlap. Just do a pixel-wise AND of the test dial and actual image together and take the sum of the result.

- The position with the maximum overlap is your current reading.

measure the current with a current clamp (0)

Anonymous Coward | more than 5 years ago | (#25739983)

It may be far easier to measure the current in the two mains power conductors with a current clamp and use that to estimate the power. You don't need to mess with the live wires as it works inductively.If you want it to be more accurate, measure the line voltage with a digital volt meter as well.
Both of these things should be available online and have convenient DC outputs that can be digitized, if not already digitized and available on RS-232 serial or USB.

Corner detection (1)

skeeto (1138903) | more than 5 years ago | (#25739987)

From looking at your image, this doesn't seem like it should be very difficult to implement, unless you want extreme precision on the 10's dial. The dials themselves aren't moving, and you don't need to actually read the numbers. You just need to know where the tip of the needle is, then use that position relative to the center of the dial to get a reading. The first thing I would do is subtract the background. Use a couple different images to patch together a "background" image, where the needles are missing. Inconsistent lighting may pose an issue here, however, so controlling the lighting makes the software side much easier.

After subtracting the background and hopefully leaving you with a bunch of plain needles, apply a low-pass filter (smoothing) to remove and noise and cruft, then convert the image into a binary image. Dilate [wikipedia.org] followed by an erosion [wikipedia.org] to fill in holes left behind by numbers overlapping the needle (this may not be necessary). Then find the most extreme black blob (the one furthest from the center) on a dial (easy, as this is now a binary image). You now know where the point of the needle is. Convert the angle between point and center into a reading.

I'm just throwing out an idea based on the computer vision classes I took in college. It may not work at all. Other approaches may use a Harris corner detector [wikipedia.org] and/or an edge detector [wikipedia.org] .

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...