March 9, 2010

Using Webcam in MATLAB for Image Acquisition

Wanted to access webcam via MATLAB, read this.

In MATLAB, you can check if the support is available for your  camera. MATLAB has built-in adaptors for accessing these devices.

You must check if you have the data acquisition toolbox in your version. that you have installed.
Just get to the MATLAB Start menu > Toolboxes > Data Acquisition


To get information about installed adapters, type
>> imaqhwinfo
Here, in this case the adaptor is 'winvideo'
To get more information about the device, type
>> info=imaqhwinfo('winvideo')


 Now let's see how to use the webcam
1) Connect your webcam to the computer through the USB, or use the intergrated laptop camera.
You can preview the video captured by the image by defining an object and associate it with the device.
>> vid = videoinput('winvideo', 1, 'RGB24_320×240');




2) Open Preview window to view video in realtime
>> preview(vid);

3) Capturing and storing images

1. Capturing an image
To capture an image from the video, define the object vid as described before and use getdata to capture a frame from the video.
>>start(vid); 
>>im=getdata(vid,1);  % im = getsnapshot(vid); alternative use
>>figure,imshow(im);

2. Storing the image
You can store the captured image as a .jpg or .gif file using imwrite function. 
>>imwrite(im,'myfirstimage.jpg');

This image will be stored in current work directory folder. 

Now try yourself, add, and tweak.

Read more...

November 28, 2009

ASC File Format

Files with an extension of ".ASC" are usually ASCII text files, similar to the TXT file format. For Windows, while double-clicking an "ASC" file does not normally open Notepad, these files can normally be viewed with such a tool.

Windows users: NOTE that unless you have configured your computer with the file extension viewing tweak, it is possible that a filename that looks like it ends with ".asc", especially one attached to an e-mail message, actually has a hidden OTHER extension, meaning that if you double-click the file, it may actually run a computer virus!

Read more...

TXT File Format

A file ending in ".TXT" usually designates that the file is a plain-text file. This can contain virtually any type of text - a recipe, documentation for software, a book report draft, or whatever.

When a file ending in ".TXT" is double-clicked, a text editor, such as Notepad, should appear, allowing you to view and/or edit the contents of the file.

Windows users: NOTE that unless you have configured your computer with the file extension viewing tweak, it is possible that a filename that looks like it ends with ".txt", especially one attached to an e-mail message, actually has a hidden OTHER extension, meaning that if you double-click the file, it may actually run a computer virus!

Read more...

Viewing File Extensions on Windows

Depending on how your Windows computer is setup, file extensions may be hidden. Instead of seeing files containing a period and 1-4 character extensions, all you see are the filenames without the extensions. Or, some files may have extensions, but not all of them.

For safety reasons, and to learn more about file formats, you should configure Windows to show all file extensions.

Although the instructions for showing file formats differ depending on the version of Windows you are running, they are generally the following:

1. Open any folder on your machine.
2. Choose "Tools" - "Folder Options".
3. Click the "View" tab.
4. Uncheck "Hide extensions for known types".
5. Click "OK" to close the dialog box.

Read more...

September 13, 2009

Recommended FireFox Extensions

Here are some firefox extensions, which I recommend under MUST category

  • NoScript : Allows you to control, sites which can execute java/flash or any other script. Best to have for security reasons.
  • AdBlock Plus : Disables any advertisements on the webpages you visit. (includes blocking of flash adv)
  • Gmail Notifier : If you are a gmail user, its very handy
  • Split Browser : If you have a wide screen display ( like TFT display), this is a must, allows to you see multiple pages at same time.
  • Google toolbar : If you have gmail account and if you are not using a public PC for browsing, this will help you to send any page (or selected content) through gmail. Includes bookmark button which can be accessed globally from any PC.
  • Foxpose : If you are used to open so many TABs while browsing, this one helps you to show a window with preview of all tabs, easy to find any TAB. (also see Tab scope)

You can find these extensions through google or give a search here https://addons.mozilla.org/en-US/firefox/

Read more...

Quick download IEEE paper

Recently, IEEEXplorer has introduced a STAMP on when you download publications from the site. So everytime you click a link to download/open the pdf in the browser there is a IEEE image banner and the pdf in the bottom frame. Sometimes it has happens that the PDF does not open even after waiting for a long time. So here is a simple trick to download the pdf file.


For e.g : If the link that you are trying to open is :

then just copy that address and paste in the terminal and REPLACE the PART as below

http://ieeexplore.ieee.org/stampPDF/getPDF.jsptp=&isnumber=&arnumber=823551

Now use 'wget' to download the file as mypaper.pdf.


[DONT FORGET THE QUOTES around the link] wget

"http://ieeexplore.ieee.org/stampPDF/getPDF.jsp?tp=&isnumber=&arnumber=823551" -O mypaper.pdf

For IWL users: It is assumed that wget recognizes your proxy settings (might be through cntlm/ntproxy). Else use konqueror to open the new link, konqueror can directly open/download the PDF.

Proxy-settings for konqueros is in "Tools-Configure Konqueror-Proxy"

Read more...

September 6, 2009

TinyURL and Internet Security

In the previous post we have seen uses of URL shortening service.


So what is the RISK !!

lets take an situation:
If you recieve an email from someone (forum, newsletters, company) telling you to click on link,if the site appears to be Chinese or Russian site you would'nt click on it write (bingo). And obvious if you have good Anti-virus installed, it will detect the links and warn you .

But, if email links point to TinyURL you are in no position to know the identity of the site, maybe it is hacked site or hacker's. And it is not possible for Anti-virus package to detect it.

Tinyurl isn't the only redirection service. Here is a list of sum od them's

  • tinyurl.com
  • bit.ly
  • budurl.com
  • eweri.com
  • hex.io
  • idek.net
  • is.gd
  • poprl.com
  • snipr.com
  • twurl.nl
  • ub0.cc
This phenomenon has resulted in many URL shortening services.

Here's what I do or You should :

  • Use a good anti-virus that scans web pages also.
  • Be cautious of shortened URLs
  • Use good web browser (Check the browsers hack list)
  • And. Services provied by TinyURL like Preview feature

Read more...

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP