Pages

Showing posts with label use. Show all posts
Showing posts with label use. Show all posts

Wednesday, January 25, 2017

The worlds largest photo service just made its pictures free to use

Getty Images is the worlds largest image database with millions of images, all watermarked. These represent over a hundred years of photography, from FDR on the campaign trail to last weeks Oscars, all stamped with  transparent square placard reminding you that you dont own the rights. If you want Getty to take off the watermark, until now, you had to pay for it. Getty Images, in a rare act of digital common sense, have realised that so many of its images are online in the public space accessible via a Google image search. So, providing you register, you can simply embed one of their images in your web page (like you would for a YouTube clip) and you can now legally use their image, along with a label that indicates its source. Its very refreshing to see a company be so pragmatic about digital rights. Rather then employing teams of people to issue take down notices and legal threats theyve made it easy for everyone to use their wonderful images. So heres a lovely photo of the beautiful Auckland waterfront at night curtsy of Getty Images. 



from The Universal Machine http://universal-machine.blogspot.com/

IFTTT

Put the internet to work for you.

via Personal Recipe 895909

Read More..

Sunday, January 22, 2017

How to determine how many cameras are connected to a computer and connect to and use ptz cameras

How to determine how many cameras are connected to a computer and connect to and use ptz cameras:

I figure this is a nice easy first post. This is some code I struggled with finding a couple years ago on automatically determining how many cameras are connected to a computer via directshow (this code is also useful in a ptz application as I will show right after). I use OpenCV to capture from the camera and the directshow library to use the ptz camera functions. I also used the vector and stringstream library for my own ease (#include<vector> #include<sstream>)

The DisplayError function is a generic wrapper for you to fill in, whether you use printf or a messagebox.

int getDeviceCount() {
  try {
    ICreateDevEnum *pDevEnum = NULL;
    IEnumMoniker *pEnum = NULL;
    int deviceCounter = 0;
    HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, reinterpret_cast<void**>(&pDevEnum));
    if (SUCCEEDED(hr)) {
      // Create an enumerator for the video capture category.
      hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, 0);
      if (hr == S_OK) {
        IMoniker *pMoniker = NULL;
        while (pEnum->Next(1, &pMoniker, NULL) == S_OK) {
          IPropertyBag *pPropBag;
          hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)(&pPropBag));
          if (FAILED(hr)) {
            pMoniker->Release();
            continue; // Skip this one, maybe the next one will work.
          }
          pPropBag->Release();
          pPropBag = NULL;
          pMoniker->Release();
          pMoniker = NULL;
          deviceCounter++;
        }
        pEnum->Release();
        pEnum = NULL;
      }
      pDevEnum->Release();
      pDevEnum = NULL;
    }
    return deviceCounter;
  } catch(Exception & e) {
    DisplayError(e.ToString());
  } catch(...) {
    DisplayError("Error Caught Counting # of Devices");
  }
  return 0;
}


This can easily be modified to connect to x number of ptz cameras with a quick ptz class

Here is our ptz class:

class ptz {
public:
  struct controlVals {
  public:
    long min, max, step, def, flags;
  };
  IBaseFilter *filter;
  IAMCameraControl *camControl;

  bool valid, validMove;
  CvCapture *capture;
  bool Initialize() {
    camControl = NULL;
    controlVals panInfo = {0}, tiltInfo = {0};
    HRESULT hr = filter->QueryInterface(IID_IAMCameraControl, (void **)&camControl);
    if(hr != S_OK)
      return false;
    else
      return true;
  }

  void ptz(int instance) {

    threadNum = instance;
    // sets up a continuous capture point through the msvc driver
    capture = cvCaptureFromCAM(threadNum);
    if (!capture)
      valid = false;
    else
      valid = true;

  }
  void Destroy() {
    if(camControl) {
      camControl->Release();
      camControl = NULL;
    }
    if (filter) {
      filter->Release();
      filter = NULL;
    }
  }
};


And here is the modified getDeviceCount code which now connects to all the cameras and gets the ptz information using direct show:

int getDeviceCount(vector<ptz> &cameras) {
  try {
    ICreateDevEnum *pDevEnum = NULL;
    IEnumMoniker *pEnum = NULL;
    int deviceCounter = 0;

    HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, reinterpret_cast<void**>(&pDevEnum));
    if (SUCCEEDED(hr)) {
      // Create an enumerator for the video capture category.
      hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, 0);
      if (hr == S_OK) {
        IMoniker *pMoniker = NULL;
        do {
          if (pEnum->Next(1, &pMoniker, NULL) == S_OK) {
            IPropertyBag *pPropBag;
            hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void**)(&pPropBag));
            if (FAILED(hr)) {
              pMoniker->Release();
              continue; // Skip this one, maybe the next one will work.
            }
            if (SUCCEEDED(hr)) {
              ptz tmp = ptz(deviceCounter);
              HRESULT hr2 = pMoniker->BindToObject(NULL, NULL, IID_IBaseFilter, (void**) & (tmp.filter));
              if (tmp.valid)
                tmp.validMove = tmp.Initialize();
            }
            pPropBag->Release();
            pPropBag = NULL;
            pMoniker->Release();
            pMoniker = NULL;
            deviceCounter++;
          } else {
            ptz tmp = ptz(deviceCounter);
            cameras.push_back(tmp);
            deviceCounter++;
            break;
          }
        }
        while (cameras[deviceCounter -1].valid);
        pEnum->Release();
        pEnum = NULL;
      }
      pDevEnum->Release();
      pDevEnum = NULL;
    }
    return deviceCounter;
  } catch(Exception & e) {
    DisplayError(e.ToString());
  } catch(...) {
    DisplayError("Error Caught Counting # of Devices");
  }
  return 0;
}


Notice now how we have integrated OpenCV into our ptz class. Now as we find cameras we can capture the camera information using OpenCV and then use directshow to grab the information used for ptz. To move the camera we can use  a pan and a tilt function like the following:

HRESULT MechanicalPan(IAMCameraControl *pCameraControl, long value) {
  HRESULT hr = 0;
  try {
    long flags = KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE | KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL;
    hr = pCameraControl->Set(CameraControl_Pan, value, flags);
    if (hr == 0x800700AA)
      Sleep(1);
    else if (hr != S_OK && hr != 0x80070490) {
      stringstream tmp;
      tmp << "ERROR: Unable to set CameraControl_Pan property value to " << value << ". (Error " << std::hex << hr << ")";
      throw Exception(tmp.str().c_str());
    }
    // Note that we need to wait until the movement is complete, otherwise the next request will
    // fail with hr == 0x800700AA == HRESULT_FROM_WIN32(ERROR_BUSY).
  } catch(Exception & e) {
    DisplayError(e.ToString());
  } catch(...) {
    DisplayError("Error Caught panning camera");
  }
  return hr;
}
// ----------------------------------------------------------------------------
HRESULT MechanicalTilt(IAMCameraControl *pCameraControl, long value) {
  HRESULT hr = 0;
  try {
    long flags = KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE | KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL;
    hr = pCameraControl->Set(CameraControl_Tilt, value, flags);
    if (hr == 0x800700AA)
      Sleep(1);
    else if (hr != S_OK && hr != 0x80070490) {
      stringstream tmp;
      tmp << "ERROR: Unable to set CameraControl_Tilt property value to " << value << ". (Error " << std::hex << hr << ")";
      throw Exception(tmp.str().c_str());
    }
    // Note that we need to wait until the movement is complete, otherwise the next request will
    // fail with hr == 0x800700AA == HRESULT_FROM_WIN32(ERROR_BUSY).
  } catch(Exception & e) {
    DisplayError(e.ToString());
  } catch(...) {
    DisplayError("Error Caught tilting camera");
  }
  return hr;
}




Consider donating to further my tinkering.


Places you can find me
Read More..

Wednesday, July 13, 2016

Rupee Font Use the Indian Rupee Symbol on Computer Keyboard

Rupee Font - Use the Indian Rupee Symbol on Computer Keyboard

Hi Everyone!!!
Few days back, i wrote about the proposed Unicode character code U+0971 be assigned for the new Rupee symbol

Today ill tell you how to use the Indian Rupee Symbol on keyboard using the Rupee Font.

First of all download the Indian Rupee Symbol Font File

Step 1:
Install the font.


Step 2:
Open MS Word change the font to Rupee Foundation


Step 3:
Press the tilde key on the Keyboard.


Thats it!!!
Now you can see the symbol on the Keyboard.


Read More..

Thursday, June 30, 2016

Do you use Internet glue

Do you use Internet glue? Do you know what it is? Basically its a web service that links two web services together; hence the name Internet glue. For example, actions  you take in your webmail system could to update your ToDo list, or add a calendar reminder. Back in January I blogged about how I use IFTTT (if this then that) to create and disseminate these blog posts. Increasingly though these systems are starting to integrate with our smartphones. IFTTT can use the iPhones location to trigger actions and can integrate with iOS reminders, contacts and the camera roll.  IFTTT has now launched on Android with a deeper set of integrations with the OS than their iOS offering. This is possible because Android has a "more laissez-faire attitude when it comes to allowing apps to extend their tentacles into core OS functions."
If you havent started using IFTTT I highly recommend you do. Not only can it smooth your workflow but it can also be fun.

from The Universal Machine http://universal-machine.blogspot.com/

IFTTT

Put the internet to work for you.

via Personal Recipe 895909

Read More..

Wednesday, June 29, 2016

Simple is better Making your web forms easy to use pays off




Imagine yourself filling out a long and cumbersome form on a website to register for a service. After several minutes of filling out fields, coming up with a password, and handling captchas, you click the submit button to encounter your form filled with red error messages. Suddenly the “close tab” button seems much more tempting than before.

Despite the rapid evolution of the Internet, web forms, with their limited and unilateral way of interaction, remain one of the core barriers between users and website owners. Any kind of obstacle or difficulty in filling in online forms can lead to increased frustration by the user, resulting in drop-outs and information loss.

In 2010, a set of 20 guidelines to optimize web forms was published by researchers from the University of Basel in Switzerland, including best practices aimed to improve web forms and reduce frustration, errors and drop-outs. For instance, guideline no. 13 states that if answers are required in a specific format, the imposed rule should communicated in advance; or no. 15 that states that forms should never clear already completed fields after an error occurs.

To investigate the impact of applying these rules, we conducted a study and presented our results at CHI 2014: Designing usable web forms: empirical evaluation of web form improvement guidelines. In the study, we examined a sample of high traffic online forms and rated them based on how well they followed the form guidelines outlined by the 2010 publication. We then selected three different online forms of varying qualities (low, medium and high), and improved them by applying the guidelines, with the high quality form needing less modification than the medium and low quality forms. We then tested both the original and improved forms extensively with 65 participants in a controlled lab environment.

In our study, the modified forms showed significant improvements over the original forms in the time users needed to complete a form, an increase in successful first-trial submissions and higher user satisfaction. As expected, the impact was highest when the original form was of low quality, but even high quality forms showed improved metrics.

Furthermore, user interviews with participants in the study revealed which guidelines were most impactful in improving the forms:

  • Format specifications (e.g., requiring a minimum password length) should be stated in the form, prior to submission. The application of this guideline had a large positive impact on user performance, subjective user ratings and was also mentioned frequently in user interviews.
  • Error messages must be placed next to the erroneous field and designed in a way users are easily able to fix the problem. Doing this reduced form-filling time and increased subjective ratings.
  • Most frequently users mentioned that it was key to be able to tell apart optional and mandatory fields.

Example Guideline: State format specification in advance
 Example Guideline :Place error message next to erroneous fields
Example Guideline: Distinguish optional and mandatory fields
Putting field labels above rather than adjacent to the fields in the form led also to improvements in the way users scanned the form. Using eye-tracking technology, our study shows that users needed less number of fixations, less fixation time and fewer saccades before submitting the form for the first time.


Figure 4.png
Scan path for an original and improved form
From our study, we conclude that optimizing online forms is well worth the resource investment. With easy to implement actions, you can improve your forms, increase the number of successful transactions, and end up with more satisfied users. Google is currently working on implementing these findings on our own forms.

We wish to thank our co-authors at the University of Basel, Switzerland for their collaboration in this work: Silvia Heinz, Klaus Opwis and Alexandre Tuch.
Read More..

Thursday, April 28, 2016

Use Tabs in Windows Explorer like in mozilla Firefox

Tabs have made the way of surfing the Internet a lot easier. Using tabs in the browsers have eased up the trouble faced when switching between all the windows opened. Tabs are really the need of today that prevents from cluttering the desktop with lots of windows.

Using Tabs in the internet browsers like Firefox, Opera, IE7 and Chrome etc have made me feel the need of tabs in the Windows Explorer as well and I think there are many others like me who can’t live without tabbed browsing in the explorer.

Here is a way with which we can add tabs to the Windows Explorer, for example we can create one tab that contains all Windows Explorer folders, one for Internet and one for some other application.

Method 1:
QT TabBar

tabs for Windows Explorer
QTTabBar is an Add-In that gives Tab Browsing Feature to your Explorer. Just download and run this tool, and after that the computer needs to be restarted and you need to activate the toolbar in the View -> Toolbars menu.
Now every time you click on a new folder, it will be opened in a new tab. isn’t it cool?
Download QT TabBar

Method 2:
Window Tabifier

tabs for Windows Explorer
This program allows us to host several open Windows in one parent window so that you can easily access and navigate between them, as well as clean up space in the taskbar. This will allow us to group similar Windows together, easily navigate between them and clean up space in the taskbar.
Download Window Tabifier
Read More..

Thursday, February 11, 2016

Use your mobile phone as webcam warelex S60 application

Turn your Symbian smartphone into a high-quality web camera and throw out your bulky USB webcam. Very simple to install and configure, Mobiola Web Camera consists of two software components: 1) a client application that resides on the phone, and 2) a webcam PC driver compatible with any Windows application that can receive video feeds from a web camera including Skype, Yahoo, MSN, AOL IM, ICQ messangers, www.YouTube.com, www.MySpace.com and www.grouper.com. Carry your webcam with you wherever you go and connect it to your laptop at anytime.

Download it here
Read More..

Wednesday, May 21, 2014

How to use Software Updater in avast

Read More..