3D milk scanner
3D milk scanner
Inspired by the original milkscanner, I built my own out of bits of junk-
Instead of taking pictures all the time, I'm using a video and extracting the frames in virtualdub, I got some encouraging results for a first test-
However... I've got some problems.
Firstly, milk is prone to bubbles and has too much surface tension, so the resolution isn't as good as it should be. If you try to break the surface down with a detergent then you get more bubbles, which is no good. I'm looking for an opaque liquid with a really thin surface that's not very viscous and won't strip the paint off or stain my mum's tacky ornaments.
Secondly, my algorithm for reconstruction sucks. The video compression artefacts ruin the nice flat surfaces and the auto-balance changes the colours between frames. I guess I need some kind of blur / flood-fill / average difference thing but I haven't decided what yet..
Thirdly, a constant flow of liquid doesn't mean constant depth, I need some kind of constant calibration object in the scan, like a 45 degree slope or something. Area of cross sections won't cut it because part of the object will be occluded... there's also the problem of perspective correction
Finally, how do you go about merging multiple heightmaps from different directions into a solid mesh? Sounds like a hard (yet fun) problem.
Any ideas?
Instead of taking pictures all the time, I'm using a video and extracting the frames in virtualdub, I got some encouraging results for a first test-
However... I've got some problems.
Firstly, milk is prone to bubbles and has too much surface tension, so the resolution isn't as good as it should be. If you try to break the surface down with a detergent then you get more bubbles, which is no good. I'm looking for an opaque liquid with a really thin surface that's not very viscous and won't strip the paint off or stain my mum's tacky ornaments.
Secondly, my algorithm for reconstruction sucks. The video compression artefacts ruin the nice flat surfaces and the auto-balance changes the colours between frames. I guess I need some kind of blur / flood-fill / average difference thing but I haven't decided what yet..
Thirdly, a constant flow of liquid doesn't mean constant depth, I need some kind of constant calibration object in the scan, like a 45 degree slope or something. Area of cross sections won't cut it because part of the object will be occluded... there's also the problem of perspective correction
Finally, how do you go about merging multiple heightmaps from different directions into a solid mesh? Sounds like a hard (yet fun) problem.
Any ideas?
-
- Posts: 288
- Joined: Wed Oct 29, 2008 12:07 pm
Being a chemical engineering major I may be of some help for your liquid problem. The best bet, if you are willing to find it may be a Aqueous Copper (II) Nitrate solution. Copper Nitrate is a blue salt that dissolves in water making a nice thick blue cloudy solution. Orange juice may be less bubbly than milk but it stills bubbles. If you want zero bubbles get some kind of salt that has color (salts dissolve in water 100% disassociation). They dont stain but they react with Aryl compounds such as benzene but im sure you shouldnt have a problem with that.
Which is exactly why he is not using the original milkscanner program and is making his ownArmen138 wrote:i think using still pictures instead of video will eliminate a lot of the bubbling... but the result will be of lower resolution, obviously
Alpha Omega, correct me if I am wrong, but doesn't a Copper Sulfate and Water mixture produce a translucent, and not opaque, liquid? Once it starts to be come cloudy instead of translucent, isn't that the point where the water is no longer dissolving any copper sulfate because the mixture is saturated?
@bitplane: If you do use the copper sulfate (because I could be wrong about the opacity deal) I'd watch out for putting anything with iron in there, like if any of those ornaments have metal pieces or hooks at all. If I remember correctly, the mixture of Copper Sulfate and Water produces SulfurDioxide, which oxidizes iron very quickly.
One thing you could try (Although it's messy) is food coloring. You should be able to get that at close to if not completely opaque, and it shouldn't bubble or have any more surface tension than does water.
-
- Posts: 288
- Joined: Wed Oct 29, 2008 12:07 pm
copper sulfate solutionDeM0nFiRe wrote:
Alpha Omega, correct me if I am wrong, but doesn't a Copper Sulfate and Water mixture produce a translucent, and not opaque, liquid? Once it starts to be come cloudy instead of translucent, isn't that the point where the water is no longer dissolving any copper sulfate because the mixture is saturated?
copper nitrate solution
I refered to Copper Nitrate although they are very similar compounds.
You are correct but as you can see putting enough Copper Sulfate or Nitrate in a solution makes a nice opaque blue color. I have used it in lab and it is very blue even if not saturated. Also a alternative I just thought of is using a mixture of Calcium (II) Hydroxide. It will make a white solution that looks just like milk, it is also safer and doesnt stain your hands if you get it on you.
Nitrates in total are alot more soluble in water than sulfates thus it is hard to get an oversaturated mixture of Copper Nitrate.
Cool, thanks for the suggestions
Armen, I don't want to use photos because I don't have camera control software or one of those putton pusher rod things and a tiny bit of camera shake from me pressing the button would mess the whole thing up. Besides, video is just easier - I can get all 255 levels of depth for the heightmap, possibly even more.
I'll try to souce some copper nitrate
Armen, I don't want to use photos because I don't have camera control software or one of those putton pusher rod things and a tiny bit of camera shake from me pressing the button would mess the whole thing up. Besides, video is just easier - I can get all 255 levels of depth for the heightmap, possibly even more.
I'll try to souce some copper nitrate
For what do you use the Bacardi actually?
Generated Documentation for BlindSide's irrNetLite.
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko
I think I understood how to solve your problem just by taking a quick look at you first picture : the bubbles are probably made by the flow of the milk from the tin can into your container. In the original milkscanner milk is added between the photos, so, during the photo, the milk doesn't have any bubble.
Sorry for my awful english ^_^'
The bubbles are just part of the surface tension problem, the main problem here is that there's a skin on the surface of milk which means that the milk bulges up before settling over the surface, which reduces the available resolution.hayate wrote:I think I understood how to solve your problem just by taking a quick look at you first picture : the bubbles are probably made by the flow of the milk from the tin can into your container. In the original milkscanner milk is added between the photos, so, during the photo, the milk doesn't have any bubble.
The background noise isn't caused by bubbles in the picture, they're compression artefacts caused by the video (bubbles are not square). I could fix this by taking pictures, but I want an automated solution.
bitplane wrote: Thirdly, a constant flow of liquid doesn't mean constant depth, I need some kind of constant calibration object in the scan, like a 45 degree slope or something. Area of cross sections won't cut it because part of the object will be occluded... there's also the problem of perspective correction.
You can use an electric valve to control the flow of the milk controlling it with a small application: add some colored lines on the side of the container, when the milk cover one of the lines close the valve, wait a bit for the surface to became quiet, then reopen the valve (or a small electric pump instead of the valve) .bitplane wrote: I could fix this by taking pictures, but I want an automated solution.
I think that if you use something less viscous than milk you surface will be filled with waves insted of bubbles (maybe I'm wrong)
yeah, and next time you'll say that Santa Claus isn't real shattering all my dreams...bitplane wrote: (bubbles are not square).
Sorry for my awful english ^_^'
Well, I could get my PIC Micro programmer out and make a proper solution, capturing video frames by webcam or TWAIN source but that kinda defeats the whole purpose of a milk scanner being accessible to everyone (everyone who has access to a kitchen and a camera capable of doing video)
A laser scanner with turntable would be a better choice if I was going hi-tech, which I probably will one day but that's not exactly a Sunday afternoon project.
A laser scanner with turntable would be a better choice if I was going hi-tech, which I probably will one day but that's not exactly a Sunday afternoon project.