November 24, 2016

Fixing nasty barrel effect (fisheye distortion) from Sony Action Camera (AS200V, etc)


Sony Action Cams have some desirable features than GoPro such as image stabilization. However they opted to use really wide angle 170°  lens. This created a nasty fish-eye effect on the recorded videos.

All recent Sony Action cams (AS100V, AS200V, FDR-X1000V) use this type of lens.

We can correct this issue as shown here. The left image is highly distorted (look at the trees) and the right picture is the corrected video.



To correct it :

  • Download install VirtualDub. Choose the 32 bit version due to plugin compatibilities
    it is a popular free video editing tool
  • Download and install the filter pack from Emiliano Ferrari
    one of the filter is "barrel distortion" which we will use
    Also you can download from my mirror
  • Load the video and add the Barrel Distortion filter
    Video > Filter > Barrel Distortion
  • Configure Barrel Distortion filter with the following values:
    Alpha: -0.33200
    Beta: 0.08800
    Aspect ratio: untick


  • Save the video as AVI
You can see samples of my video on this fix:

Video without correction
Video with correction applied

The tall trees are quite telling.

June 21, 2016

Best ROM for Moto G 2nd gen (2014) XT1068

Paranoid Android 4.6 is a KitKat based ROM which runs much faster (and I cannot overstate it!) compared to Lollipop or Marshmallow on MotoG 2nd gen. With Marshmallow there is very noticable lag when running programs, and much worse if you install memory-hungry application such as Facebook. KitKat requires only 512kBytes of memory compared to 1GB for Lollipop and Marshmallow. These newer OS really require more powerful/newer phones with more RAM.


User DiamondBond from XDA-Forum is credited for this release of ROM. You can follow the full discussion in this link.

Please not that the later release of XT1068 uses Toshiba front camera, which does not work with KitKat. So don't use this ROM if you like to take selfies. Earlier versions of the phone might get lucky.

My environment was Windows 10 and  Moto G 2nd Gen (XT1068) running the official Android Marshmallow.

These are the steps needed to use ParanoidAndroid 4.6 on your MotoG 2nd Gen:

1. Unlock the phone
(screenshot)
  • First, install Motorola USB Driver on your PC
  • On your phone, enable USB debugging option. Go to Settings > About Phone > Tap 'Build Number' 7 times
  • Open Settings> Developer options and enable “USB Debugging” & “OEM Unlock”on your device.
  • Download MFastboot and extract on your PC
  • Turn off your phone. Then turn on your Moto G again by holding volume down button and power key for few sec and release it.You will see the Bootloader will be open on the screen.
  • Connect your Moto device to PC via USB cable
  • Now open command prompt from Mfastboot folder. From Mfastboot Folder Hold the shift key and right click on the mouse the in any black space in that folder you will see open command window here -- click on that)
  • Type this command the cmd window: fastboot oem get_unlock_data. It will display some code in different lines. Just copy that code in a notepad to get a single line string
  • Go to the official Motorola Unlock Site and paste that single line of code. You might need to register to the site first. Agree to the terms and click 'Request Unlock Key'.You will receive the unlock code in your email
  • Go back to Mfastboot cmd window and type in: fastboot oem unlock <YOURKEY>.
    (e.g. in my case it was fastboot oem unlock 4JV7Q4R4VX4YNSHBXYW5)
  • The phone should be unlocked now. Reboot the phone (you can type fastboot reboot)

2. Root the phone
(screenshot)
  • Download and install "ADB and Fastboot Drivers". Just press 'Y' to all questions and it will be placed in c:\adb default directory
  • Download titan-24.11.10-BR-boot.img and place it in the c:\adb directory above
  • Open a cmd window from that directory (just like step 1) and issue this command:
    fastboot flash boot titan-24.11.10-BR-boot.img 
  • Reboot the phone and you're done rooting

3. Install TWRP+SuperSU and backup your stock ROM
(screenshot)
  • Download TWRP. Extract and place it in c:\adb folder above
  • Open a cmd window from c:\adb and type in: fastboot flash recovery twrp.img
  • Reboot the phone and go to bootloader mode (hold power+vol down for a few seconds then release)
  • Select 'recovery' and your phone will load the TWRP menu. Do "Swipe to Allow Modification"
  • This is a good time to BACK UP your current stock ROM in case you want it back in the future. Select 'Backup' and just accept the defaults. When done you might want to reboot the phone normally and save the file somewhere save (like your PC).
  • After the saving the backup, download SuperSU-....zip and transfer it to your phone using normal windows explorer
  • Reboot the phone to bootloader mode again into TWRP, select 'Install' > Choose SuperSU-....zip > Install Image
  • Done! and reboot normally

4. Install Paranoid Android ROM + GApps
  • Download the Paranoid Android 4.6 ROM and the corresponding GApps
  • Copy them using windows explorer to the phone
  • Reboot the phone to Bootloader  mode to TWRP
  • Select Wipe > Swipe to Factory Reset (this will wipe Data, Cache, and Dalvik)
  • Go back and select 'Install'
  • Select the ROM (pa_titan-4.6 ...) as the FIRST zip
  • Select GApps (pa_gapps-...) as the SECOND zip
  • Install Image and just follow default instructions
  • Done and Reboot! The first time it runs it will take sometimes
  • I recommend to install NovaLauncher and change the wallpaper (see above pic)

FAQ
- Will this work for my (non-XT1068 phone) ? A: NO
- Will there be further updates of KitKat based ROM? A: NO
- How is the battery life with PA ROM? A: It's great. Better than stock Marshmallow
- Can I try different ROMS easily? A: Yes, just download the ROMs and appropriate GApps


Thanks and credits to:
- DiamondBond for the ROM release
- Snoop5 for ADB and Fastboot Drivers


Tips:
1) You can also copy files while in recovery (TWRP) mode by using adb:
boot into recovery (not bootlader), then from the PC:
adb devices
adb push filename.zip /sdcard/ROM
image

2) There will be a boot loader warning once the phone is rooted. You can remove it by following the instruction here:
http://www.droidviews.com/remove-unlocked-bootloader-warning-moto-g-2014/

April 23, 2016

Silencing the ThinkPad x61



ThinkPad x61 is one of the best laptops ever produced, period. In fact they are one of the last laptops using the golden 4:3 screen ratio. However I desire 0dB laptops and nearly bought a fanless Zenbook UX305A. I bought a UX31E before and even being one of the quitest laptops around, they are too loud for me.

Using an under-volted external fan, the near-0dB silence was achieved.

1) Install the program to control the fan speed called "TPFanControl"
https://sourceforge.net/projects/tp4xfancontrol/

2) Buy a ThermalTake Pure8 80mm fan ($8) and power it using 9v which. Cut a small piece of cardboard to create a 'tunnel' towards x61's vents and direct the airflow INTO it.

At 9v, the external fan is so quiet it is absolutely inaudible at 30cm distance from my ears. In fact my wife's Zenbook UX21e's fan at 3 meters away was piercing my ears in this quiet nigt! As I type this the ThinkPad's temperature is sitting in a cool 56° celcius. 

The inward flow of air is fine, when absolutely needed, X61's internal fan is strong enough to counteract the flow. I've never needed this except when running CPU load tests :). The added bonus is cooling airflow on top of the keyboard. No more sweaty fingers in summer.

I'm sure this would work on other ThinkPad models such as x40 or x41 as well as they have similar cooling hardware.

Have a quiet night !

Discussions on ThinkPad forum here:
http://www.thinkpads.com/forum/viewtopic.php?f=30&t=120837