Explored Stellarium for display of panoramas in our mirrordome, using the camera move and mirrordome distortion capabilities of Stellarium 0.10.2. The pan is shown dimmed in stellarium, so the way to go for full brightness panoramic views would be to create fisheye images using this technique and rotate them in blender for a camera pan effect. Mapped onto a square surface in Blender, rotated it.
Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Wednesday, November 14, 2012
Monday, November 12, 2012
using stellarium for generating fulldome scenes
Tried out both stellarium and blender for generating fulldome scenes for our mirrordome setup. Using the starball file from Ron Proctor, rotated it by 30 degrees or so over 250 frames - 10 seconds of 25 fps video. Rendering took seven hours at around 90 seconds per frame. Using stellarium, I could generate starfields and rotate them in real-time, and capture using tools like Fraps and Taksi. Performance-wise, Fraps is better, and is more user-friendly. But Taksi's price is right for me - free.
Initially had some trouble setting up Taksi - things to note are:
Initially had some trouble setting up Taksi - things to note are:
- The capture shortcut key must be chosen so that it does not interfere with the software from which you're capturing. For eg. the default F6 key causes the Location window to open in Stellarium.
- Taksi does not capture with some of the available codecs, for eg. those codecs which are decode-only, obviously! So, we have to choose the codec with care. Xvid seems to be OK, but frame-rates drop quite a bit due to processing overhead. Have to compensate by playing the scene slowly and speeding up the captured video later.
- Had trouble hiding the gui with Stellarium 0.10.2 - the
core.setGuiVisible(false) ; //hide tool bar
doesn't seem to work. Upgraded to 0.11.4 and then found that the 0.10.2 was the last version where the mirror warping worked! Alexander has upgraded this bug to Critical, so hopefully it will be fixed soon. Merely installing 0.10.2 over 0.11.4 did not work - Stellarium did not load correctly at all. Uninstalled and re-installed, restarted, then it worked. - Since my laptop display is 1280x800, in order to get a higher resolution screen capture, hooked up an external monitor. The AOC Spectrum 7VIrA did support 1920x1080, but not 1600x1200. Had to go to
NVIDIA Control Panel -> Set up multiple displays -> Only use one display
for getting single display mode - the short-cut Fn-F5 was not working. Even in single display mode, the screen-grab of KMPlayer did not show the video. But stellarium was being captured OK at around 4 fps by Taksi (with Xvid codec) and 12 fps by Fraps (with it's own Fraps codec). Single display mode was required, because even though stellarium gets captured in dual-screen mode, it uses the resolution of the primary monitor - 1280 x 800 in my case and not the 1920 x 1080 of the secondary monitor when switching to full-screen mode. - This version 0.10.2 has a bug with the auto-hidden toolbars not popping up when moving the mouse to the left corner. Have to use false flags for auto_hide_horizontal_toolbar and auto_hide_vertical_toolbar in the config.ini at
C:\Documents and Settings\\Application Data\Stellarium - Tried out a script with screen capture after moving one degree, works.
for(azi=90; azi<=300; azi+=1)
{
core.moveToAltAzi(alt, azi, 1);
core.wait(2);
core.screenshot("myscreenshot", false);
}
using a usb mem key drive to improve speed
Using flash memory for virtual memory does speed things up a bit on old computers - A asked me about it, I passed on this to him -
On Windows XP, it is this way:
Right-click on My Computer
Choose Properties
Choose the Advanced Tab
Click the Settings button under Performance (Visual effects, memory usage, etc)
Choose the Advanced tab
Click the Change button under Virtual Memory
Choose your USB mem key drive letter, choose custom size and enter the amount based on how much free space is available on your USB mem key. More than 4 GB would be good.
Choose the other hard disks drive letters and choose "No Paging File" for those disks.
Choose OK and restart the computer.
Of course, once you have set the paging file like this, you should not unplug your usb drive when the machine is on :)
On Windows XP, it is this way:
Right-click on My Computer
Choose Properties
Choose the Advanced Tab
Click the Settings button under Performance (Visual effects, memory usage, etc)
Choose the Advanced tab
Click the Change button under Virtual Memory
Choose your USB mem key drive letter, choose custom size and enter the amount based on how much free space is available on your USB mem key. More than 4 GB would be good.
Choose the other hard disks drive letters and choose "No Paging File" for those disks.
Choose OK and restart the computer.
Of course, once you have set the paging file like this, you should not unplug your usb drive when the machine is on :)
Saturday, November 10, 2012
more options for making web radios on the cheap
A follow-up to my earlier post, here is another el-cheapo web radio, elegantly simple with power over ethernet, for parts under $30 if we sacrifice the display etc - found via Wired.com - http://www.watterott.net/ projects/webradio-arm
I did contact Watterott, but they are busy for the next 6 months. Plus the mp3 decoder card used has now been superceded by a new model, so some changes would be needed to the design.
I did contact Watterott, but they are busy for the next 6 months. Plus the mp3 decoder card used has now been superceded by a new model, so some changes would be needed to the design.
Tuesday, November 06, 2012
extracting audio from video file - without virtualdub etc
For non-technical users, extracting audio from video files like flv files or mp4 files can be done using VLC - this post shows how in detail.
panorama mapping formula
As mentioned in my previous post, the field of view is what decides the "stretching" if needed. As an empirical test, the original stadium pan in this post seems to be around 120 degrees horizontally and around 60 degrees vertically. So, vertically it would need to be multiplied by 3 to cover the full 180 from front to back, and horizontally it would need to be multiplied - again by 3 - to cover the 360 degrees all around the observer. And indeed, using white space instead of cloning to save time, using an image where the pan is the ower middle tile in a 3x3 set of tiles of the same size as the pan,
we get this polar image, which seems to be quite undistorted.
If we keep the same aspect ratio as the orig of this pic and reduce the white space, we get more coverage of the dome with the image. The extreme case of this would be to use the pan itself without any padding, since the padding is equal in horiz and vert directions in this case. Then we get this,
we get this polar image, which seems to be quite undistorted.
If we keep the same aspect ratio as the orig of this pic and reduce the white space, we get more coverage of the dome with the image. The extreme case of this would be to use the pan itself without any padding, since the padding is equal in horiz and vert directions in this case. Then we get this,
where we can see that the Hanuman statue which is further away from the horizon seems to be vertically stretched. On the dome also, it is seen to be vertically stretched. So, in general, we should shoot for images which are near the horizon, and we can clone the sky or mirror the image for filler.
Sunday, November 04, 2012
more on using panoramas on fulldome
But my posts so far have been for using a shortcut to displaying the panorama on the dome. Finishing up my previous post, here is the pan with the "visible" region having the interesting part of the pan, with the rest of the image filled with a mirror image and white space on top (which could have been replaced with "sky".) The amount of stretching required seems to be a bit ad-hoc, depending on the field of view, I suppose. If the field of view is more, then probably the stretching may not be required? Anyway, this was stretched 2.5x, and made into a rectangle and not a square before making polar - implying more stretching in that process.
Flat image, stretched and mirrored:
and the polar version,
For better results, I guess I should map the pan onto a cylindrical surface and use the view from the fisheye camera in Blender.
I'll check out the above image by animating it to make a full circle and watch it on the dome, and then proceed.
Flat image, stretched and mirrored:
and the polar version,
For better results, I guess I should map the pan onto a cylindrical surface and use the view from the fisheye camera in Blender.
I'll check out the above image by animating it to make a full circle and watch it on the dome, and then proceed.
Saturday, November 03, 2012
displaying panoramas on fulldome
I had explored displaying panoramic photos on our mirrordome setup in an earlier post, just using Filters -> Distorts -> Polar Co-ordinates in Gimp on a square image. Here are some more details. The filter dialog box was as below,
Here, the map backwards prevents the resulting polar image from being left-right inverted. If Map from top is removed, the result is like these mini planets. The offset angle is entered so that Hanuman statue is centred on the resulting fulldome image.
Merely adding more 'sky' and making the pan square is not enough. The resultant fulldome image will appear squished down vertically. Example below.
This image, which is square,
we get this,
Here, the map backwards prevents the resulting polar image from being left-right inverted. If Map from top is removed, the result is like these mini planets. The offset angle is entered so that Hanuman statue is centred on the resulting fulldome image.
Merely adding more 'sky' and making the pan square is not enough. The resultant fulldome image will appear squished down vertically. Example below.
This image, which is square,
becomes this image on doing polar co-ords distort
So, the image has to be vertically stretched 2.5x for it to look reasonably good. The image below is stretched 3x, it looks a bit vertically elongated on the dome:
3x stretched pan made into a square,
and then polar:
Now, if the image is not made into a square, still the polar distortion can be done. But the resulting image is as if the original had been stretched to make it into a square and then the polar distortion was done. For example, with this original image,
which is the same as we get if we distort this image got by stretching the pan into a square,
Now, these are not 360 degree pans - more like 180 degrees or even less. Assuming 180 degrees, we would get an image like this if we were to add white space for the missing 180 more degrees - I have put in a text background colour to highlight the white space.
But this also yields a vertically squished image,
As our audience is front-facing, the region which is well visible to our audience is highlighted below,
So I can try and make pans with some clouds or a fade-to-grey or something for the non-visible part, and push the relevant pixels into the visible part. The non-visible part is around 25%, so we can try adding 25% to the width of the image and then making it polar.Friday, November 02, 2012
HTC Wildfire update
The HTC Wildfire mobile phone informed me of a 4 MB software update, 2.25.720.4. Downloaded it on the phone, said that it needs to restart phone after the update. I was updating Opera, so waited till that finished before going back to the software update. For this, I had to go to Settings -> About Phone -> System software updates
Once the update was installed and the phone rebooted, it took a good 10 minutes to boot up. The HTC welcome screen ("quietly brilliant") was displayed for a while, then the lock screen came on, on unlocking also the HTC welcome screen, finally a progress box with percentages display, finally booted to the home screen.
Once the update was installed and the phone rebooted, it took a good 10 minutes to boot up. The HTC welcome screen ("quietly brilliant") was displayed for a while, then the lock screen came on, on unlocking also the HTC welcome screen, finally a progress box with percentages display, finally booted to the home screen.
using an xp machine as gateway
N wanted to use an XP machine as a gateway for a LAN which is normally not connected to the internet. Googled it and found that to use Windows XP as a router, it's a simple registry edit,
HKEY_LOCAL_MACHINESYSTEM -> CurrentControlSet -> Services -> TcpipParameters -> IPEnableRouter
should be set to 1.
Step-by-step instructions on how to set gateway properties on each of the machines etc is given at
http://www.home-network-help.com/ip-forwarding.html
HKEY_LOCAL_MACHINESYSTEM -> CurrentControlSet -> Services -> TcpipParameters -> IPEnableRouter
should be set to 1.
Step-by-step instructions on how to set gateway properties on each of the machines etc is given at
http://www.home-network-help.com/ip-forwarding.html
our DKIM keys
This story in Wired prompted me to check our DKIM key length for radiosai.org - this post indicates I have used 1024 bits, safe for now.
colour correction for mirrordome
As mentioned in my previous post, the colours in our projection were not very accurate - highlights washed out and so on. Changed the modes on the projector and viewed the blu ray movie which came along with the projector. With that movie, the modes sRGB, movie, presentation and bright all looked similar. But with our Darshan video, movie seemed a bit too reddish, with a slight excess of brightness over contrast. Presentation looked better, so currently have set it to presentation.
Tuesday, October 30, 2012
a brief descent into cell-phone purgatory
I had taken out my Airtel SIM card to try out radiosai using GPRS on an iphone and a windows mobile 5 phone. After putting it back into my HTC Wildfire Android phone, the phone started giving flash messages with junk characters at the rate of 3 messages every five minutes. The messages had two options - save or cancel. If saved, they were saved to the messages folder. The messages looked like this:
=¤¡$C@@$£Ã˜J9§AåΣ7¿L£$ùøÆch¿_¥
Three messages every five minutes is too much to bear, right? Tried calling Airtel customer care. I did not know what exactly to ask them, I said junk characters are seen on my phone like a flash message. They said they will disable flash messages for my number. But the messages kept appearing. Went upto supervisor on Friday and Saturday. Still no respite - supervisor said that they are logging the issue, expect a resolution time of 48 hours. But till Tuesday, no respite.
The messages would stop at night after 9.30 or 10 pm and would start again the next day after 9 or 10 am. So I was led to believe this was some sort of message being sent by Airtel. But then I was wrong.
Finally thought of google - googled flash messages on airtel htc wildfire and found that these could be due to cell broadcast messages. Then googled disable cell broadcast htc wildfire and found this link which says Settings -> Call -> Other Call Settings -> Cell broadcast. But on my phone, it was in Settings -> Call -> Cell broadcast and was already disabled. I enabled it and then disabled it. And that resolved the issue!
=¤¡$C@@$£Ã˜J9§AåΣ7¿L£$ùøÆch¿_¥
Λ¿Ã¨G
Q$ΦIΓ#OB@é(AR7kJM¥ jÆΨ3¡$d0
Z0yBIKù¡T9.f@éxaR4tF!+f
ò*i¿£Î”u
And when saved were seen to be from the number 4204.Q$ΦIΓ#OB@é(AR7kJM¥ jÆΨ3¡$d0
Z0yBIKù¡T9.f@éxaR4tF!+f
ò*i¿£Î”u
Three messages every five minutes is too much to bear, right? Tried calling Airtel customer care. I did not know what exactly to ask them, I said junk characters are seen on my phone like a flash message. They said they will disable flash messages for my number. But the messages kept appearing. Went upto supervisor on Friday and Saturday. Still no respite - supervisor said that they are logging the issue, expect a resolution time of 48 hours. But till Tuesday, no respite.
The messages would stop at night after 9.30 or 10 pm and would start again the next day after 9 or 10 am. So I was led to believe this was some sort of message being sent by Airtel. But then I was wrong.
Finally thought of google - googled flash messages on airtel htc wildfire and found that these could be due to cell broadcast messages. Then googled disable cell broadcast htc wildfire and found this link which says Settings -> Call -> Other Call Settings -> Cell broadcast. But on my phone, it was in Settings -> Call -> Cell broadcast and was already disabled. I enabled it and then disabled it. And that resolved the issue!
recovering from rm *
V did an rm * on his system when trying to delete his Skype folder. Trying to recover deleted files from his Ubuntu Linux system with PhotoRec by booting with a Live CD.
We needed a root shell to go into the folder and run it - used sudo -i as given here.
Tried recovering from the unallocated space - 153,174,016 sectors - initially it estimated around 4 hours to completion. Actually took 8 hours. And it recovered 320,000 files in 600+ recovery folders! Digging out the actual files which were needed out of that mountain was another task, trying to use
find /folder/where/recovered/files/are -name '*ods'
didn't yield any results, probably open document spreadsheet files are not recognized as such by photorec and are saved as generic binary elf files?
Next step was a search within files for a known string contained within the file, like
find /folder/where/recovered/files/are -exec grep -l "Jaya Jaya" {} \;
But that takes a looong time, since there are many GBs of files. The idea is to do it in batches of a few thousand files. For eg. a search on saiwaves over 173 MB of 10 kB files - around 15,000 files - took around 2 minutes.
Update: V says he proceeded in a semi-manual way. He used a tool 'search for files' which allowed him to search specifying file size limits and other parameters. He found that there are multiple copies of the same file (versions over time) which have been recovered. And he found that generally the files recovered which are in the same recovery folder were in the same folder to begin with. So he found some ods files with the 'contains string' method, and by opening them manually, found the latest version. mp3 files had their filenames stripped, but he was able to rename them back using an mp3 tagger tool. The whole process took him till 3 am to complete. He restored a backup he had made 15 days ago, and overwrote the files which he had modified over the last 15 days using the recovered files.
We needed a root shell to go into the folder and run it - used sudo -i as given here.
Tried recovering from the unallocated space - 153,174,016 sectors - initially it estimated around 4 hours to completion. Actually took 8 hours. And it recovered 320,000 files in 600+ recovery folders! Digging out the actual files which were needed out of that mountain was another task, trying to use
find /folder/where/recovered/files/are -name '*ods'
didn't yield any results, probably open document spreadsheet files are not recognized as such by photorec and are saved as generic binary elf files?
Next step was a search within files for a known string contained within the file, like
find /folder/where/recovered/files/are -exec grep -l "Jaya Jaya" {} \;
But that takes a looong time, since there are many GBs of files. The idea is to do it in batches of a few thousand files. For eg. a search on saiwaves over 173 MB of 10 kB files - around 15,000 files - took around 2 minutes.
Update: V says he proceeded in a semi-manual way. He used a tool 'search for files' which allowed him to search specifying file size limits and other parameters. He found that there are multiple copies of the same file (versions over time) which have been recovered. And he found that generally the files recovered which are in the same recovery folder were in the same folder to begin with. So he found some ods files with the 'contains string' method, and by opening them manually, found the latest version. mp3 files had their filenames stripped, but he was able to rename them back using an mp3 tagger tool. The whole process took him till 3 am to complete. He restored a backup he had made 15 days ago, and overwrote the files which he had modified over the last 15 days using the recovered files.
Thursday, October 25, 2012
gprs keep alive on Windows Mobile 5
Wanted to make my old Windows Mobile phone a usable internet radio. For that, gprs keep-alive was needed, since TCPMP by itself was not keeping the connection alive even when it was streaming. Instead of the $2 app, this registry hack did the trick.
[HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections]
for the relevant connection (which connects over GPRS, I had named mine as Mo), switch the "AlwaysOn" value from 0 to 1. Then, one can manually stop the GPRS connection from the Connection Manager by turning Data off, but to connect one just needs to do some sort of network activity like make a phone call or something like that, after which it automatically connects and remains connected.
[HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections]
for the relevant connection (which connects over GPRS, I had named mine as Mo), switch the "AlwaysOn" value from 0 to 1. Then, one can manually stop the GPRS connection from the Connection Manager by turning Data off, but to connect one just needs to do some sort of network activity like make a phone call or something like that, after which it automatically connects and remains connected.
Wednesday, October 24, 2012
disabling a single page in apache
I wanted to disable a html page which had a lot of graphics on it when we were doing live video streaming from the same box. Did it by editing /etc/apache2/sites-available/default
Added a line
RedirectMatch path/to/the/file.html http://radiosai.org/tempUnavailable.html
and restarted Apache.
/etc/init.d/apache2 restart
Added a line
RedirectMatch path/to/the/file.html http://radiosai.org/tempUnavailable.html
and restarted Apache.
/etc/init.d/apache2 restart
Saturday, October 20, 2012
more adjustments to the mirrordome
More tweaking after my previous post about mirrordome adjustments in our Planetarium. The distortions of lines which should be vertical becoming slanting on the sides, and of spheres becoming oblate spheroids in projection, were all due to projector and mirror positioning. The default warp settings are for a setup like this, (as shown at Paul's website)
But our mirror and projector were much more angled, like this,
As a result of that, we needed to use keystone correction to make the image on the mirror rectangular in shape (instead of trapezoidal) as seen from the projector as in the somewhat exaggerated drawing below.
The projector and mirror do need to be tilted because ours is a tilted dome, but they should be aligned so that the image on the mirror is rectangular. As Paul pointed out, digital keystone correction reduces the effective number of pixels and so the clarity of the image suffers.
Taking a look at the Bangalore Planetarium as suggested by Paul, found that their Mitsubishi UD 8400 projector with the rated 6500 lumens ($10,000)was giving a much better image, not just in brighness, but also colour accuracy and focus. In comparison, our Optoma EP1080 is 3600 lumens. The pixelation, screen door effect etc was similar, but not so noticeable since their audience sits further away from the dome.
To be done: adjusting projector positioning and colour calibration for more improvements. Also can explore other projectors. Paul also mentioned the Optoma TH7500 (6000 lumens, $9,000) and the Optoma EH2060 (4000 lumens, $1,500) as a cost-effective alternative.
But our mirror and projector were much more angled, like this,
As a result of that, we needed to use keystone correction to make the image on the mirror rectangular in shape (instead of trapezoidal) as seen from the projector as in the somewhat exaggerated drawing below.
The projector and mirror do need to be tilted because ours is a tilted dome, but they should be aligned so that the image on the mirror is rectangular. As Paul pointed out, digital keystone correction reduces the effective number of pixels and so the clarity of the image suffers.
Taking a look at the Bangalore Planetarium as suggested by Paul, found that their Mitsubishi UD 8400 projector with the rated 6500 lumens ($10,000)was giving a much better image, not just in brighness, but also colour accuracy and focus. In comparison, our Optoma EP1080 is 3600 lumens. The pixelation, screen door effect etc was similar, but not so noticeable since their audience sits further away from the dome.
To be done: adjusting projector positioning and colour calibration for more improvements. Also can explore other projectors. Paul also mentioned the Optoma TH7500 (6000 lumens, $9,000) and the Optoma EH2060 (4000 lumens, $1,500) as a cost-effective alternative.
Friday, October 19, 2012
making our own internet radio
Thought this Raspberry Pi hack of a home-built wifi radio would be a good starting point for us to make our own low-cost internet radio for people to listen to radiosai. But then, the cost would be around Rs. 3,000, and for that price Mutant radios are available in the US during discounts. Also, the Raspberry Pi based device is a bit difficult to configure to use the home wifi access point for non-techies. Also, SK said that he has had discussions with a Hyderabad-based mobile-phone assembling company for making our own internet radio with SIM-based connectivity instead of wifi, which would be more usable etc.
Later, I made the following two documents for different options for connectivity:
Options for people in India - http://goo.gl/YO795
Options for people overseas - http://goo.gl/ShwuS
Technical details for connecting - http://goo.gl/GH1DM
(Even though internet radios are available in India, the prices are nearly double the prices in US. Hence, other devices are mentioned as options for people in India. The Logitech squeezebox, for eg. is $100 in the US, but Rs. 12,000 in India.)
Edit - another inexpensive web radio option explored here.
Later, I made the following two documents for different options for connectivity:
Options for people in India - http://goo.gl/YO795
Options for people overseas - http://goo.gl/ShwuS
Technical details for connecting - http://goo.gl/GH1DM
(Even though internet radios are available in India, the prices are nearly double the prices in US. Hence, other devices are mentioned as options for people in India. The Logitech squeezebox, for eg. is $100 in the US, but Rs. 12,000 in India.)
Edit - another inexpensive web radio option explored here.
deleting all contacts on iphone
Easy way to do it for the console enthusiasts: just ssh into the phone, delete the files in /User/Library/AddressBook and then reboot.
Was let to it by this forum thread, which has the wrong path mentioned.
Was let to it by this forum thread, which has the wrong path mentioned.
Thursday, October 18, 2012
how to use MTS dongle on android tablets
A reply to a query as the title suggests. For CDMA/EVDO dongles like MTS and Tata Photon, so this post seems to have the solution for rooted tablets.
Subscribe to:
Posts (Atom)



















