Simultaneous Scanning

Problems, solutions and discussion about scanning with a video projector and stripe patterns.

Simultaneous Scanning

Postby MagWeb » Mon Jan 02, 2012 12:13 am

Hi,
happy new year 2012 to all the guys and girls out there!

Another try to keep the stone of invention rolling in this community and prevent it from getting only a support forum. So I would be glad to get your feedback, ideas for improvement and anything you´d like to comment or ask.

I'll publish a way to (almost) double your scanresult.
This is meant to do fast scans, as scans of facial expressions. So, if you are interested in getting data as precise as possible: Ignore it!

In my strange test setup ( see attachment 1), I was able to get ALL the shown data (about 180° - see attachment 2) of a 10cm plaster bust with a SINGLE scan, using one cam and one projector. I used DAVIDs standard settings (here: frequencies: 7, shifts: 6 @ a pattern holding time of 148 ms). Means, the total scan lasted about 1.8 sec.

You´ll need some tinkering and some DAVID-addon.
But for nothing is easy, I'll leave you with a riddle today...

Tomorrow more....

Gunter
Attachments
SetupGhost.JPG
Result1.jpg
MagWeb
Moderator
 
Posts: 2378
Joined: Wed Jul 18, 2007 8:48 pm

Re: Simultaneous Scanning

Postby mipu » Mon Jan 02, 2012 1:58 pm

thats interesting!
windows 7 quadcore, benq beamer, canon dslr, automatic rotating table.
mipu
 
Posts: 101
Joined: Thu Apr 21, 2011 8:15 pm
Location: Tirol, Austria

Re: Simultaneous Scanning

Postby Jeanyes » Mon Jan 02, 2012 5:51 pm

You are somehow using a mirror to split the projector image in two and casting it to both sides of the face at once? Now I have no idea how to scan that fast. I look forward to more info!
Jeanyes
 
Posts: 19
Joined: Sun Dec 04, 2011 11:52 pm

Postby hal » Mon Jan 02, 2012 10:33 pm

Gunter, is too easy to know the solution you adopted...
Now that at Geneva C.E.R.N. scientists have found that the Higgs Boson is faster than the light (so means that this elementary particle can be in a place B first to start from place A), you have the possibilities to be in 2 places in the same moment. so, you can scan a 360° object in one time.
now the question is an other... do you have friends at C.E.R.N.? :wink:

Hope to read more soon,
Regards and best 2012 wishes, dear bavarian vulcanic brain.
User avatar
hal
Moderator
 
Posts: 1451
Joined: Thu Mar 01, 2007 4:08 pm
Location: Cavaria con Premezzo (VA), Italy.

Re: Simultaneous Scanning

Postby MagWeb » Mon Jan 02, 2012 11:30 pm

Hi again,

Higgs Bosons - nice toys - I´d love to have the money to play with them (thanks for your wishes, Mattia - buono novo anno!)
Mirrors - not that bad and much cheaper. :) I like mirrors (for they show me a beautiful face each morning :wink: )

ok, I used two mirrors at an angle of 135° as shown in attachment1.
This gave me this native result (attachment2)
Why 135°?:
Mirrors at 135° reflect both sides of a single plane, which is placed exactly at the bisecting line and along the Y axis, at an angle of 90° (360 - 2x135 = 90). This makes it possible to insert a single board at the bisecting line of the mirror corner for calibration using the settings of a "negative" calibration corner (to set this up, see: viewtopic.php?f=15&t=2752&hilit=return+negative#p15993). See attachment3
Note:
1. For your cam sees the calibration patterns through a mirror, you have to mirror the patterns before printing them.
2. Fix both printouts on both sides of the calibration board at exactly the same height and with their "folding line" right on the edge of the board, which will point to the mirrors later.
3. For you have to deal with a board (thin as possible - I used 3mm glass sheet) and not with a single plane you´ll have to set an offset in the advanced settings for the calibration patterns. For a first surface mirror, this offset (along X for the right and Z for the left pattern) should be " square-root of (boardthickness x boardthickness)". I used normal, second surface mirrors. Here optical fraction of glass should be taken into concern... but a little tweaking the offset did it here.

Now, if the cam looks exactly along the calibration board (so it sees only its edge) and the projector projects in the same way (so it casts almost no shadows), you should be able to calibrate cam and projector within DAVID. (see attachment next post)
Remove the calibration board, put an object into the mirror corner so, that the cam sees only its mirrored images and you are ready to go. It might happen that you experience good regions on the double-faced scan as well as some disturbed regions :mrgreen:

So far for today - tomorrow more

Gunter

EDIT: This method to calibrate works also for a laser-mirror-setup (moving the laser linear and perpendicular to the mirror planes)
Attachments
MirrSetup.jpg
Scanresult.jpg
Calib.jpg
MagWeb
Moderator
 
Posts: 2378
Joined: Wed Jul 18, 2007 8:48 pm

Re: Simultaneous Scanning

Postby MagWeb » Mon Jan 02, 2012 11:31 pm

-
Attachments
CamCalib2.jpg
MagWeb
Moderator
 
Posts: 2378
Joined: Wed Jul 18, 2007 8:48 pm

Re: Simultaneous Scanning

Postby maxem » Tue Jan 03, 2012 4:19 pm

Nice! I'm surprised how well this works without using first surface mirrors. Very cool idea!
maxem
 
Posts: 71
Joined: Mon Oct 19, 2009 5:56 pm
Location: USA

Re: Simultaneous Scanning

Postby MagWeb » Tue Jan 03, 2012 8:55 pm

Hi again,

Maxem, I played a lot with similar mirror setups and SL and never got the reflected data as well as using this calibration technic. I think the reason is, that, if you do it that way, cam- and projector calibration include the fraction of the glass mirrors.

So.... the shown calibration isn´t the whole story.

I said, I used a single cam (a DAVID BW cam). Now, if you setup such a mirror setup and scan, you´ll notice soon that two projections (one comming from the left, one from the right mirror) hit the object. This is no problem as long as they do not intersect each other on the object. The calibration plane as used above divides the both reflections totally , no problem. But a normal object does not do that. The intersection of the projection reflections disturb the scanning result on these regions. We might cut these regions away, but unfortunately do we need exactly these overlaps to align the partial scans later. Another way would be to light only the right side and then the left (what would result in a doubled scanning time)

Now I went a third way. And that´s the reason why the setup images above are BW: I used colored projections (see attachment1). (To color up my projections I wrote a special projection generator, I' m going to publish later)
Do you know Anaglyph images? - older 3D movie technic? Two images, differently colored shown at once while both eyes are covered with filters and one eye can only see one of the image pair?
That´s basically what I did. My software splits the projection into two halfs. One side replaces white with one color (hitting the left mirror) the other with a complementary color (I finally ended using the Anaglyph colors: Cyan and Red). Now you have a chance to split the captured images.
My first attempt was to filter these two channels by software means - but besides the fact that my BW cam hardly captures colors, I found that all my color cams (Logitech and EOS) do not work: There´s to much noise in low light conditions and I couldn´t get rid of problems caused by white- and color balances.... I dropped that also for this would need a postprocessing step of the images which is not there in DAVID (yes, I asked for that quite some time ago) and I wanted to get results faster.
There are not only software means. So I made anaglyph glasses for my cam. My daughter bought some child magazine: Included some anaglyphs and glasses :idea:
A pair of filters. I cut a half circle of each filter, joined them on a glass of a projection slide and mounted it in front of the cams optics (Does anybody know a source for such a half filter???)
Now my BW cam sees only cyan at its left and red on its right. And DAVID can process the resulting image directly (see attachment2)

There are still some problems:
- Your result is mirrored (that's easily corrected in some third party soft)
- The mirrors do reflect also light hitting the object directly. This "corona" gives the little stripe of wrong data above the heads in the native scanresult shown above. But for a face scan: this would be at the hair (if you aren´t like Kojak) and should be no problem.

Tomorrow: My special pattern generator and how to set it up.

Gunter

Edit: I thought of using polarisation filters instead of the color: Walter, do you think one could add a half/half, vertical/horizontal filter in front of the projector(maybe at some distance) AND the cam? Maybe the mirror disturbs polarisation?
Attachments
Bicolor.jpg
CamView.jpg
MagWeb
Moderator
 
Posts: 2378
Joined: Wed Jul 18, 2007 8:48 pm

Re: Simultaneous Scanning

Postby WalterMo » Wed Jan 04, 2012 9:40 am

Hi Gunter,
I also wish you the very best for the new year.

Your current project is very interesting, again full of good ideas.
Regarding the half red and half cyan filter, I couldn't find something out there. My special source is Edmund Optics, but even there no result:
http://www.edmundoptics.com/products/br ... egoryid=10

Some time ago I made tests with polarising filters. In contrast to the laser light is the projector light coming from bulbs or LEDs not polarised. By means of a linear polarizer we can easily polarise it.
But then the light level is reduced by 50%. By inserting a second polarizer in this beam and turning it, we can adjust each light level, even down to nearly zero. But if the light behind the first polarizer hits an object and is reflected, maybe to a camera, the polarisation doesn't exists not any more! Only the light reflected by a mirror is still polarised. I could simply check this by a second polarizer in front of a camera.

Walter
User avatar
WalterMo
Moderator
 
Posts: 2190
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Postby hal » Wed Jan 04, 2012 11:22 pm

@ WalterMo:
WalterMo wrote:[...]
Regarding the half red and half cyan filter, I couldn't find something out there
[...]

Hello,
just today i was in a cinema to see a movie with 3D effect. They have given us a couple of double filters glasses. Because no one ask them back, I still have both in my pocket. They are similar to these, but more more cheap and easy (use and throw away). Aslo good thing is that my lenses are perfectly flat and planar. If you want I can send it to you.
But I guess (looking at the Gunter photos) that his filters are more colored than mine... the filters that I have here are barely visible by eyes.

Regards
Mattia
User avatar
hal
Moderator
 
Posts: 1451
Joined: Thu Mar 01, 2007 4:08 pm
Location: Cavaria con Premezzo (VA), Italy.

Re: Simultaneous Scanning

Postby MagWeb » Thu Jan 05, 2012 12:50 am

Hi again,

Walter, thanks for considering pol-filters (and your wishes, sure: All the best for the new year back to you and Braunschweig!). The loss of 50% using pol filters would be better than my current way, loosing 66% with this color information. So , if it is not that big thing, I would be grateful if you could check out whether the object's reflections damage polarisation.

Mattia, simply try your glasses watching the projections or an anaglyph image (Greg and Walter posted some here)... (my filters were much cheaper... and the color in the image above is not right)

Today I discussed making of such half/half filters with a friend. Maybe there are two ways to do that easily: One is to draw the filter in photoshop and give it to a slide service to make a transparency, the other is to print this drawing on an overhead projector foil. Both ideas not tested yet.. let me know if you got results.

Forgot to describe how to handle this double faced mesh in Shapefusion:
- Simply forward it to Shapefusion,
- Duplicate it,
- Erase the left data on the first and the left on the second,
- Now you have two meshes to align in any mode. Here it works nicely using DAVIDs free alignment mode, but also Rotation around Y should work (maybe better - didn´t check that out)

Ok, as promised, my pattern generator attached.
It was written and compiled in PROCESSING with its limited GUI means. But it should run as a standalone app. Let me know if there are problems.
It communicates with DAVID directly via its COM messages if you follow these installation and settings:
1. Install a virtual com-port-pair (e.g using com0com: Get it here for free and follow its installation: http://sourceforge.net/projects/com0com/ . Its default pair works here - so, do not worry about the connections.)
2. Make sure that the ports are named "COM1" and "COM2" (You've to rename the default pair)
3. My app reads the lowest port available - should be COM1. So if DAVID sends its messages to COM2, com0com directs those messages to COM1
4. Start DAVID and enable COM communication for StructuredLight (HardwareSetup: StructuredLight/Customize and set the port to COM2)
5. Change the COM message for StartCalibrationScan from "S" (default) to "X" (Capital letter)
6. Disable DAVIDs SL-pattern-automode
7. Make sure that your WINDOWS desktop is expanded to a second monitor and your projector is ON
8. Set DAVIDs projection to your FIRST screen (it has to be there. You might minimize it >>> RMB)

Now:
Unzip my app to anywhere and run the .exe contained within the folder (Disclaimer: This was made in the hope to be useful and you get it as it is for free. "Free" also means: without any warranty in functionality or concerning any damage of or on your system. Although I did my best and I´m trying to keep my system free of viruses, you are using it at your own risk! To get rid of it, you should simply have to remove the folder)
The .exe creates two windows. One, the controller, should appear on your main screen, while the second should fill your second screen (the projector). This second window (the projections) can be closed only via your task bar - sorry .
The controller comes with two slides ("R" and "C") at the upper left (red). Here you can set the color intensity for Cyan (left in the projection) and Red (right) to get a balanced image in your cam.
In the middle are two sliders for frequencies and shifts (orange). These values HAVE TO BE THE SAME (as well as the INV, "inverse" button) as set in DAVID (the default settings, freq. 7 and shifts 6 and "inverse" disabled, should match to the settings when you hit "standard" in DAVIDs SL menue).
The blue slider "Edge" sets the edge between red and cyan, so you can adjust this boarder to your hardware.
Below this slider is a toggle INV. If enabled (light red) the app will add the inverse projections of the "BW" stripes (has to be equal as the settings within DAVID)
The lower red row are simple buttons to switch between different projections.

If the app is running, there are two automatic modes:
Calibration: If you hit Calibrate projector in DAVID, it should project a pale pink pattern sequence (this is a mix of R and C, for we do not need any split here)
Actual Scanning: If you hit Scan in DAVID, it should display a sequence of split R/C projections

I´m sure to've forgotten something....please ask

Gunter
Attachments
BiColorScan.jpg
SL_Projector_Anaglyph.zip
Disclaimer: This was made in the hope to be useful and you get it as it is for free. "Free" also means: without any warranty in functionality or concerning any damage of or on your system. Although I did my best and I´m trying to keep my system free of viruses, you are using it at your own risk! To get rid of it, you should simply have to remove the folder
(427.72 KiB) Downloaded 63 times
MagWeb
Moderator
 
Posts: 2378
Joined: Wed Jul 18, 2007 8:48 pm

Re: Simultaneous Scanning

Postby WalterMo » Thu Jan 05, 2012 11:37 am

Gunter,
As I told in my post above, polarized light isn't longer polarized if it is reflected by an object. Only light reflected by a mirror (even simple mirrors) is still polarized.
This is also true for laser light which is normally polarized without an additional pol filter.

Sorry, but this is the fact. Time ago I "dreamed" to use horizontal and vertical linear polarized laser light for improved scanning. But I have forgotten the concrete situation (reason) at that time, I am growing older. :wink:

Walter
User avatar
WalterMo
Moderator
 
Posts: 2190
Joined: Mon Apr 02, 2007 6:52 pm
Location: Braunschweig, Germany

Re: Simultaneous Scanning

Postby MagWeb » Thu Jan 05, 2012 12:26 pm

Hi Walter

Sorry , I understood your first message's "could" as a subjunctive :oops: not as a past tense . Thanks for clearing!

Gunter
MagWeb
Moderator
 
Posts: 2378
Joined: Wed Jul 18, 2007 8:48 pm


Return to Structured Light Scanning

Who is online

Users browsing this forum: turbogeek and 0 guests