Something More for Research

Explorer of Research #HEMBAD

Archive for March, 2015

Build and Use OpenBLAS in Microsoft Visual Studio

Posted by Hemprasad Y. Badgujar on March 27, 2015


Build and Use OpenBLAS in Microsoft Visual Studio

As of OpenBLAS v0.2.10, it is currently only possible on Windows to build OpenBLAS with MinGW. The resulting library can be used in Visual Studio, but it can only be linked dynamically. This configuration has not been thoroughly tested and should be considered experimental.

Incompatible x86 calling conventions

Due to incompatibilities between the calling conventions of MinGW and Visual Studio you will need to make the following modifications ( 32-bit only ):

  1. Use the newer GCC 4.7.0. The older GCC (<4.7.0) has an ABI incompatibility for returning aggregate structures larger than 8 bytes with MSVC.

Build OpenBLAS on Windows OS

  1. Install the MinGW (GCC) compiler suite, either 32-bit (http://www.mingw.org/) or 64-bit (http://mingw-w64.sourceforge.net/). In addition, please install MSYS with MinGW.
  2. Build OpenBLAS in the MSYS shell. Usually, you can just type “make”. OpenBLAS will detect the compiler and CPU automatically.
  3. After the build is complete, OpenBLAS will generate the static library “libopenblas.a” and the shared dll library “libopenblas.dll” in the folder. You can type “make PREFIX=/your/installation/path install” to install the library to a certain location.

**Notice. We suggest using official MingWin or MingWin-w64 compilers. A user reported that s/he met Unhandled exception by other compiler suite.https://groups.google.com/forum/#!topic/openblas-users/me2S4LkE55w

Generate import library (before 0.2.10 version)

  1. First, you will need to have the lib.exe tool in the Visual Studio command prompt.
  2. Open the command prompt and type cd OPENBLAS_TOP_DIR/exports, where OPENBLAS_TOP_DIR is the main folder of your OpenBLAS installation.
  3. For a 32-bit library, type lib /machine:i386 /def:libopenblas.def. For 64-bit, typelib /machine:X64 /def:libopenblas.def.
  4. This will generate the import library “libopenblas.lib” and the export library “libopenblas.exp” in OPENBLAS_TOP_DIR/exports. Although these two files have the same name, they are totally different.

Generate import library (0.2.10 and after version)

  1. OpenBLAS already generated the import library “libopenblas.dll.a” for “libopenblas.dll”.

Use OpenBLAS .dll library in Visual Studio

  1. Copy the import library (before 0.2.10: “OPENBLAS_TOP_DIR/exports/libopenblas.lib”, 0.2.10 and after: “OPENBLAS_TOP_DIR/libopenblas.dll.a”) and .dll library “libopenblas.dll” into the same folder.
  2. Please follow the documentation about using third-party .dll libraries in MS Visual Studio 2008 or 2010. Make sure to link against a library for the correct architecture. For example, you may receive an error such as “The application was unable to start correctly (0xc00007b)” which typically indicates a mismatch between 32/64-bit libraries.

Notice. If you need CBLAS, you should include cblas.h in /your/installation/path/include in Visual Studio. Please read this page.

Limitations

  • Both static and dynamic linking are supported with MinGW. With Visual Studio, however, only dynamic linking is supported and so you should use the import library.
  • Debugging from Visual Studio does not work because MinGW and Visual Studio have incompatible formats for debug information (PDB vs. DWARF/STABS). You should either debug with GDB on the command-line or with a visual frontend, for instanceEclipse or Qt Creator.

Posted in Computer Softwares, Installation, Research Menu | Tagged: , , , , , | Leave a Comment »

Visual Studio Output Window Auto-Scrolling

Posted by Hemprasad Y. Badgujar on March 17, 2015


To re-enable autoscrolling, while in the output window just hit CTRL+END.

Posted in Mixed | Leave a Comment »

30+ Tools for Synching Files and Folders

Posted by Hemprasad Y. Badgujar on March 17, 2015


Open Source Software

power-folder

rsync – For those who know how to use the command line, rsync is a fast incremental file transfer utility. Requires manual configuration to setup correctly.

Unison – Developed by the University of Pennslyvania, Unison is similar to rsync and has been around for a while. It works on a variety of platforms, including Windows, Mac, Linux, and Solaris.

WinSCP
– Mainly a SFTP and FTP transfer client for Windows, however, it also has the ability for directory synchronization in semi and fully automatic ways.
PowerFolder – Easier to use for those that are not technically inclined. Securely sync, share, backup and transfer files.

Directory Synchronize (DirSync) – Very light-weight utility packed with lots of options for file and folder synchronization. Synchronize from PC to USB stick to PDA, etc.

iFolder
– Developed by Novell in 2001, iFolder is a cross-platform file synching application. Can synchronize one folder to multiple computers with different operating systems.

JFileSync – Used to sync files between two directories, either on one computer, between two computers, or between a computer and another storage device.

FullSync – A universal file synchronization and backup utility that is highly customizable and expandable.

OpenSync – Used to sync PIM data such as contacts, calendar, tasks, and notes between a personal computer and mobile device.

Conduit – If you’re using GNOME, Conduit is an open source app to synchronize files, photos, emails, contacts, etc to another computer or device.

Freeware Apps

foldershare-screen

SyncEXPERT – Extremely easy to use Windows tool to synchronize data between desktop computers, laptops, USB drives, and any other Microsoft storage device.

Allway Sync – Free file and folder synchronization program with a multi-lingual interface and support for true folder synchronization.

SyncBack – Older version is free and has basic file backup and synchronization tools. Easy to use and supports encryption and compression.

BestSync – Synchronize files to network drives, FTP servers, USB drives, and many other features.

SyncMate – Synchronize your Mac with a Pocket PC using SyncMate Free edition. Will sync text messages, documents, contacts, calendar entries, etc.

FolderShare – Microsoft’s free file synchronization tool that works on Windows XP and later and Mac OS X. Files cannot exceed 2 GB and a library cannot have more than 10,000 files.

SyncToy – Using the .NET framework, Synctoy is a simple to use Powertoy for synchronizing files and folders.

Windows Mobile Device Center – Replacing ActiveSync, it is the new program to synchronize Windows CE based devices with the Windows operating system.

Easy2Sync
– Free version allows you to sync one directory between two computers, not including sub-directories.

ViceVersa – Supports 3 file comparison methods, multiple synchronization methods, and manual copy and delete for manual file sync.

Commercial Software

sugarsync

Robocopy – Part of Windows Vista and Windows Server 2008, Robocopy is copy and xcopy on steriods. It has a mirror mode which keeps folders in sync, adding and deleting files.

Synchronize It! 3 – Compare folders, unattended backup/sync, reporting and printing features also.

Synchromagic – One-way or bi-directional synchronization of files and folders with many useful options.

GoodSync – Listed under commercial because free version only lasts 30 days. Works with any file system, unlimited number of files can be synced, customizable interface, and more.

SugarSync – Sync between your PC, Mac, and mobile device easily with remote access to your files from the Web or phone.

Bamboo File Sync – Automated file backup and syncing with support for a large array of devices, including SD cards, HTPCs, MP3 players, NAS devices, and more.

SureSync
– Provides reliable and flexible file synchronization and replication between PCs or servers.

Super Flexible File Synchronizer – Back up your data and synchronize PCs, Macs, servers, notebooks, and online storage space, including Amazon S3.

SyncTogether – Synchronization utility for Mac users to sync contacts, bookmarks, calendars and other important data between Macs.

iMobile – A corporate solution to keep data, files and software synced between mobile employees and company servers.

beinsync – Syncs files between computers, share files quickly, access files from a Web browser, and backup files online.

ViceVersa Pro
– Much more advanced than the free version with multiple sync methods, no limits on data size, etc.

Beta Software

dropbox

Dropbox – Still in private beta, but written about around the Web in a very positive light. No one knows if it’s going to be free or not, but it’s supposedly very fast, easy to use, accessible via the Web, and can be used for collaboration.

Posted in Mixed | Tagged: , , , , , , | Leave a Comment »

build Tesseract 3.03 with Visual Studio 2013

Posted by Hemprasad Y. Badgujar on March 17, 2015


Compiling Tesseract 3.02.02 with Visual C++ 2008 (Express) is covered by the documentation whereas compiling Tesseract 3.03 isn’t covered at all, though.

Unfortunately newer versions of Tesseract also require a new version of Leptonica, a C library for image processing and image analysis applications, which in turn requires new versions of zlib, libpng, libtiff, libjpeg and giflib. Tesseract provides pre-compiled versions of Leptonica, which prevents you from having to collect and set up projects for all of these libraries in Visual Studio, which can be a tedious task.

Yesterday I found a project on GitHub that includes a Visual Studio solution file for all dependencies required to compile Tesseract 3.03: charlesw/tesseract-vs2012. While following the build instructions there, I stumpled over several build errors, which I could easily resolve by removing a definition. The necessary change is in my fork of the repository mentioned above.

This is a write-up of all steps that are required to compile Tesseract 3.03 with Visual Studio 2013.

Prerequisites

  1. Install Git.
  2. Install SVN. There are many versions of SVN. You can, for example, install the binary package from SlickSVN for free.
  3. Install Visual Studio 2013 for Windows Desktop (the Express version will be enough). You don’t need the optional features except for “Microsoft Foundation Classes for C++”.

Building the dependencies

  1. Create a directory where you want to compile Tesseract. In this document, I’ll assume it’s C:\Tesseract-Build\.
  2. Open a CMD prompt and change to that directory.
    cd \Tesseract-Build\
  3. Clone the dependencies repository from GitHub.
    git clone https://github.com/SGGS-IT/tesseract-ocr.git
  4. Open the “VS 2013 Developer Command Prompt”. (It can be found in the Start Menu.)
  5. Change to the newly cloned repository.
    cd \Tesseract-Build\tesseract-vs2012
  6. Build the dependencies
    msbuild build.proj
  7. You can close the “VS 2013 Developer Command Prompt”.

Building Tesseract

  1. Re-open the first command prompt and ensure it’s still in C:\Tesseract-Build\.
  2. Get the latest source from SVN.
    svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/
  3. Change to the newly checked-out repository.
    cd tesseract-ocr
  4. Apply the patch provided in tesseract-vs2013.
    svn patch ..\tesseract-vs2012\vs2013+64bit_support.patch
  5. Copy both directories in C:\Tesseract-Build\tesseract-vs2012\release\ toC:\Tesseract-Build\. Now you should have
    • C:\Tesseract-Build\include\
    • C:\Tesseract-Build\lib\
  6. Open C:\Tesseract-Build\tesseract-ocr\vs2013\tesseract.sln with Visual Studio 2013.
  7. Press F7 on your keyboard. Both libtesseract303 and tesseract should compile without errors.

The Visual Studio solution file contains configurations for dynamic and static compilation as well as debugging and release configurations for both 32-Bit and 64-Bit. Select whichever configuration you need and recompile with F7.

You can find the compiled binaries in C:\Tesseract-Build\tesseract-ocr\vs2013\bin\.

Posted in Computer Softwares, Installation, Mixed, OpenCV, Project Related | Tagged: , , , , | Leave a Comment »

Assessing the pixel values of an image

Posted by Hemprasad Y. Badgujar on March 14, 2015



Assessing the pixel values of an image

#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "iostream"
 
using namespace cv;
using namespace std;
 
int main( )
{
 
 Mat src1;
 src1 = imread("lena.jpg", CV_LOAD_IMAGE_COLOR); 
 namedWindow( "Original image", CV_WINDOW_AUTOSIZE ); 
 imshow( "Original image", src1 ); 
 
 Mat gray;
 cvtColor(src1, gray, CV_BGR2GRAY);
 namedWindow( "Gray image", CV_WINDOW_AUTOSIZE ); 
 imshow( "Gray image", gray );
 
 // know the number of channels the image has
 cout<<"original image channels: "<<src1.channels()<<"gray image="" channels:="" "<="" *******************="" read="" the="" pixel="" intensity="" *********************="" single="" channel="" grey="" scale="" (type="" 8uc1)="" and="" coordinates="" x="5" y="2" by="" convention,="" {row="" number="y}" {column="" intensity.val[0]="" contains="" a="" value="" from="" 0="" to="" 255="" scalar="" intensity1="gray.at(2," 5);="" cout="" <<="" "intensity=" << endl << " "="" intensity1.val[0]="" endl="" endl;="" 3="" with="" bgr="" color="" 8uc3)="" values="" can="" be="" stored="" in="" "int"="" or="" "uchar".="" here="" int="" is="" used.="" vec3b="" intensity2="src1.at(10,15);" blue="intensity2.val[0];" green="intensity2.val[1];" red="intensity2.val[2];" write="" **********************="" this="" an="" example="" opencv="" 2.4.6.0="" documentation="" mat="" h(10,="" 10,="" cv_64f);="" for(int="" i="0;" <="" h.rows;="" i++)="" j="0;" h.cols;="" j++)="" h.at(i,j)="1./(i+j+1);" cout<<h<<endl<<endl;="" modify="" pixels="" of="" for="" (int="" {="" j<src1.cols;="" src1.at<vec3b="">(i,j)[0] = 0;
 src1.at(i,j)[1] = 200;
 src1.at(i,j)[2] = 0; 
 }
 }
 namedWindow( "Modify pixel", CV_WINDOW_AUTOSIZE ); 
 imshow( "Modify pixel", src1 );
 
 waitKey(0); 
 return 0;
}

Posted in OpenCV, OpenCV Tutorial | Tagged: , , , , | Leave a Comment »

Project Template in Visual Studio

Posted by Hemprasad Y. Badgujar on March 5, 2015


 

 Sample Image - maximum width is 600 pixels

Introduction

This article describes the step by step process of creating project template in Visual Studio 2012 and VSIX installer that deploys the project template. Each step contains an image snapshot that helps the reader to keep focused.

Background

A number of predefined project and project item templates are installed when you install Visual Studio. You can use one of the many project templates to create the basic project container and a preliminary set of items for your application, class, control, or library. You can also use one of the many project item templates to create, for example, a Windows Forms application or a Web Forms page to customize as you develop your application.

You can create custom project templates and project item templates and have these templates appear in the New Project and Add New Item dialog boxes. The article describes the complete process of creating and deploying the project template.

Using the Code

Here, I have taken a very simple example which contains nearly no code but this can be extended as per your needs.

Create Project Template

First of all, create the piece (project or item) that resembles the thing you want to get created started from the template we are going to create.

Then, export the template (we are going to use the exported template as a shortcut to build our Visual Studio template package):

Visual Studio Project Templates

We are creating a project template here.

Fill all the required details:

A zip file should get created:

Creating Visual Studio Package Project

To use VSIX projects, you need to install the Visual Studio 2012 VSSDK.

Download the Visual Studio 2012 SDK.

You should see new project template “Visual Studio Package” after installing SDK.

Select C# as our project template belongs to C#.

Provide details:

Currently, we don’t need unit test project but they are good to have.

In the solution, double-click the manifest, so designer opens.

Fill all the tabs. The most important is Assert. Here you give path of our project template(DummyConsoleApplication.zip).

As a verification step, build the solution, you should see a .vsix being generated after its dependency project:

Installing the Extension

Project template is located under “Visual C#” node.

Uninstalling the Project Template

References

Posted in .Net Platform, C, Computer Languages, Computer Software, Computer Softwares, Computer Vision, CUDA, GPU (CUDA), Installation, OpenMP, PARALLEL | Tagged: , , | Leave a Comment »

 
Extracts from a Personal Diary

dedicated to the life of a silent girl who eventually learnt to open up

Num3ri v 2.0

I miei numeri - seconda versione

ThuyDX

Just another WordPress.com site

Algunos Intereses de Abraham Zamudio Chauca

Matematica, Linux , Programacion Serial , Programacion Paralela (CPU - GPU) , Cluster de Computadores , Software Cientifico

josephdung

thoughts...

Tech_Raj

A great WordPress.com site

Travel tips

Travel tips

Experience the real life.....!!!

Shurwaat achi honi chahiye ...

Ronzii's Blog

Just your average geek's blog

Karan Jitendra Thakkar

Everything I think. Everything I do. Right here.

Chetan Solanki

Helpful to u, if u need it.....

ScreenCrush

Explorer of Research #HEMBAD

managedCUDA

Explorer of Research #HEMBAD

siddheshsathe

A great WordPress.com site

Ari's

This is My Space so Dont Mess With IT !!

%d bloggers like this: