Thursday, 15 June 2017

OpenCV installation for Ubuntu

OpenCV installation for Ubuntu 

To install OpenCV 2.4.2 or 2.4.3 on the Ubuntu 12.04 operating system, first install a developer environment to build OpenCV.
    sudo apt-get -y install build-essential cmake pkg-config
Install Image I/O libraries
    sudo apt-get -y install libjpeg62-dev 
    sudo apt-get -y install libtiff4-dev libjasper-dev
Install the GTK dev library
    sudo apt-get -y install  libgtk2.0-dev
Install Video I/O libraries
    sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
Optional - install support for Firewire video cameras
 sudo apt-get -y install libdc1394-22-dev
Optional - install video streaming libraries
 sudo apt-get -y install libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev 
Optional - install the Python development environment and the Python Numerical library
    sudo apt-get -y install python-dev python-numpy
 
Optional - install the parallel code processing library (the Intel tbb library)
    sudo apt-get -y install libtbb-dev
Optional - install the Qt dev library
    sudo apt-get -y install libqt4-dev
Now download OpenCV 2.4 to wherever you want to compile the source.
    mkdir xxx
    cd xxx 
    wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.2/Op...
or  
   wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/Op...
file given above are old releases please follow this link to get the latest version of the opencv http://opencv.org/releases.html    

tar -xvf OpenCV-2.4.*.tar.bz2
Create and build directory and onfigure OpenCV with cmake. Don't forget the .. part at the end of cmake cmd !!
    cd OpenCV-2.4.*
    mkdir build
    cd build
    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local
    -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON 
    -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON 
    -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
Now compile it
    make
And finally install OpenCV
    sudo make install

Saturday, 10 June 2017

Flashing/Installing stock MIUI image to the Rooted Redmi Devices and Fixing the Error 7

If you been wondering why the latest images of Android 7.1 Nougat based Lineage OS or RM OS are not working during the flashing processes showing some kind of Error 7,
Well there are 2 Solution for this problem


1) Edit the Android image zip file yourself remove the line of code regarding to devicename in the
following file which is responsible for this Error 7.
Open the Lineage OS ROM zip using any archiving software like 7zip, WinRAR, etc… You can also open it on your device.
  • Now, you need to navigate to this path: META-INF » com » google » android » updater-script.
  • Open the file updater-script in a text editor. You’ll see a bunch of lines with the command assert and the model name of the device next to it.
  • If there’s a mismatch with the codename of the device in the script, you’ll get Error 7 while flashing.
  •   
  • So, just either edit the code to match your device’s codename or delete all the lines having the code “assert & getprop”
  • Save the file.
  • Try to install the ROM now.



2) Install the Stock image of the Device in this case its the MIUI 8 from the Redmi

here is the link for it http://en.miui.com/download-301.html
on the section of -

and you also need these two things

b) Download the SuperSu zip file from here to root your phone again. Save the zip file on your phone.
Link here http://www.supersu.com/download

c) Download the lazy flasher zip file here to fix the boot loop issue. Yes, you nee to flash this file to fix the boot problem. Save the zip file on your phone internal memory.

Stable ROM

Click on Download Full Stock ROM if you have not yet rooted the device then you can follow there official guide for it that has been linked next to the download button there.
Else follow this blog.

 
 1. Download all the three files mention above and save all the file on your phone and remember the location of the files.

 2. Now open the updater application on your phone and Tap on the tap on three dots from top right corner and select “Reboot to Recovery Mode.”

 3. Now your phone will boot in the custom TWRP recovery mode.

 4. From here tap on the Wipe > Advanced Wipe and Select Dalvik Cache and Cache > Swipe to Wipe.

 5. After that go back to the main menu of the TWRP recovery. Select Install and Locate the MIUI 8 Recovery Full ROM zip file and flash the same on your phone.

 6. After flashing the ROM, Flash the Super Su zip file to get the Root access, and after that Lazy flasher zip file to fix the boot issue.

 7. Now reboot the system.


1. Download all the three files mention above and save all the file on your phone and remember the location of the files. 2. Now open the updater application on your phone and Tap on the tap on three dots from top right corner and select “Reboot to Recovery Mode.” 3. Now your phone will boot in the custom TWRP recovery mode. 4. From here tap on the Wipe > Advanced Wipe and Select Dalvik Cache and Cache > Swipe to Wipe. 5. After that go back to the main menu of the TWRP recovery. Select Install and Locate the MIUI 8 Recovery Full ROM zip file and flash the same on your phone. 6. After flashing the ROM, Flash the Super Su zip file to get the Root access, and after that Lazy flasher zip file to fix the boot issue. 7. Now reboot the system.



b) Download the SuperSu zip file from here to root your phone again. Save the zip file on your phone. c) Download the lazy flasher zip file here to fix the boot loop issue. Yes, you nee to flash this file to fix the boot problem. Save the zip file on your phone internal memory.


Monday, 5 June 2017

Highlights of WWDC 2017

I attended the World Wide Developer Conference of Apple and if you missed it or too busy to watch the lengthy keynote don't worry here it is-
In Total there are 8 new thing that came up in WWDC 2017

1 New Apple Watch OS 4.
2 Upgrades to Macbook.
3 New iMacPro.
4 Mac OS 11 High Sierra.
5 New iPad Pro.
6 HomePod.
7 ARKit
8 iOS 11


1 New Apple Watch OS 4


The Apple Watch has developed a new watch OS: Watch OS 4. Here are some of the important bits:

  1. There are new faces including a kaleidoscope and some Toy Story animations
  2. An increased focus on fitness allows for better tracking during runs and swims. There's also more encouragement for setting and achieving goals.
  3. The Apple Watch will automatically sync with fitness equipment from some of the biggest manufacturers to track your suffering.
  4. A new Music app has a redesigned interface.
  5. Native Bluetooth support allows the watch to communicate with small devices like a glucose monitor for diabetics.
  6. H.265 video supports HDR footage with 40% better compression to save space.


2 Mac and iMac


New MacBook Pros

All the MacBook and MacBook Pro are getting new Kabylake Processors from Intel (including MacBook Air).
Other big changes came in iMac
The venerable iMac computer is getting a refresh across a variety of specs. The screen is getting brighter, the max memory specs are doubling, and they're getting a pair of USB-C ports on the back for connecting fast storage.
  1. The 21.5-inch lower level model is getting a serious uptick in terms of graphic processing, which makes it 80% faster than before. 
  2. The 21.5-inch iMac 4K Retina now moves to discrete graphics, which makes it three times faster than the previous generation.
  3. The 27-inch 5K iMac goes up to 8 GB of VRAM, which can push up to 5.5-teraflops of computing power so it can handle VR development.
  4. Kaby Lake processors are coming across the board.

3 iMacPro

iMac Pro
The typical iMac can't handle super hardcore workstation stuff like machine learning development or real-time 3D rendering, so Apple build the iMac Pro. 
  1. Up to 18 cores of Xeon processing power
  2. AMD Radeon Vega graphics will handle the GPU roll.
  3. Up to 22 teraflops of computing power at the high-end which is a crazy amount. 
  4. It can have up to 128 GB of ECC memory
  5. Storage goes up to 4 terabytes built in. 
  6. It has 4 Thunderbolt ports and built-in 10 gigabit ethernet.
  7. Priced at $4,999 in December.

4 macOS High Sierra

The new version of macOS comes with a slight name change and a grip of new features.
  1. Apple now claims Safari is the fastest browser. 
  2. Auto play blocking in Safari detects videos with sound and blocks them, which is excellent.
  3. Safari's Intelligent Tracking prevention uses machine learning to identify cross-site tracking services. By, umbrella ads I see on every website.
  4. Photos gets improved search and better facial recognition. Tagging system is also synced across all devices if you're a neat freak about your images.
  5. Photos now gives you access to curves, which makes me very happy as a photography nerd. It's for advanced editing.
  6. Apple is opening its photo book printing service up to third party printers, which makes Microsoft's recent announcement about photo book printing seem weak.
  7. Public beta coming this month, free update coming in Fall as usual.
  8. Apple is releasing a new file system called APFS which is going to more performance cruncher.

5 iPad Pro 10.5-inch


iPad Pro
So a new iPad Pro today and it has a bigger screen with a smaller bazel.

  • 20% larger than the 9.7-inch, with a smaller border. 
  • It still weighs just a pound.
  • A10X Fusion with a six-core CPU and 12-core GPU which makes it 30-40% faster than the previous version across the board.
  • It's big enough to give a full-sized on-screen keyboard.
  • 120 Hz refresh rate makes scrolling and responses faster.
  • Apple Pencil now has just a 20 millisecond latency so it's more like writing. It's also 1 millisecond faster than Microsoft's Surface Pen.
  • Screens across the range will get 50% brighter.The screens also now have the color gamut for HDR video.

6 HomePod

Apple Home PodThis is the very exciting smart speaker launched by apple today. Here are the details on Apple's new smart home speaker.
  1. Siri is baked in and listens to you via six built-in microphones. It's built with the idea that you'll have an Apple Music subscription, of course.
  2. There's a HomeKit base built in, so you can use it to control smart home devices. Apple isn't focusing on this aspect as much as it is the sound quality, though.
  3. Spatial awareness helps it recognize the space it's in to tune the sound accordingly.
  4. Powered by an A8 chip that also powers the iPhone.
  5. There's a 4-inch woofer and the speaker itself is around 7-inches tall.
  6. It starts shipping in December for $349.

7 ARKit

With ARKit Apple is diving deep into the world of augmented reality, which is something that Microsoft and Google have been big on lately. It can place virtual objects on real-life surfaces in the world.
Apple ARKit
ARKit is going to let developers produce more augmented reality stuff. There's an AR Lego demo which sounds great because I can play with Legos, but not step on them.
Apple has taken this new step in Augmented Reality trend,

8 iOS 11

Apple started off its iOS 11 presentation by taking a shot at Google's Android fragmentation problem. No punches pulled there.
  1. Messages gets an update for to help sync messages across devices more efficiently as you sign in. 
  2. Apple Pay now operates on a person-to-person level so you can settle up with your friends after going out to eat.
  3. Siri is getting more conversational voices! 
  4. Siri will also now be able to do real-time translation so it can act as a go-between for people who don't have a common language.

Camera and Photos

  1. HEVC is the new format for video, which gives increased fidelity with smaller files.
  2. HEIF gives better quality photos at 2x compression.
  3. Portrait Mode in the camera now gets HDR and optical image stabilization.
  4. Machine learning recognizes different events and automatically creates slideshow-style presentations.
  5. They have embedded ML(Machine Learning ) inside the new iOS 11 to use the Apple Pencil more perfectly and to render graphics for the photos app like selecting a curve area etc.
That is all that happened today, Although more eyes will be on the September 2017 event of apple when it will launch the new IPhone8 which is going to be the most promising flagship smartphone.

Proper way to install nvidia 390 fix error

Proper way to install nvidia 390 if you see any error in the process look below; command  sudo apt purge --autoremove '*nvidia*...