Pages

Showing posts with label a. Show all posts
Showing posts with label a. Show all posts

Sunday, January 29, 2017

Improving Photo Search A Step Across the Semantic Gap



Last month at Google I/O, we showed a major upgrade to the photos experience: you can now easily search your own photos without having to manually label each and every one of them. This is powered by computer vision and machine learning technology, which uses the visual content of an image to generate searchable tags for photos combined with other sources like text tags and EXIF metadata to enable search across thousands of concepts like a flower, food, car, jet ski, or turtle.

For many years Google has offered Image Search over web images; however, searching across photos represents a difficult new challenge. In Image Search there are many pieces of information which can be used for ranking images, for example text from the web or the image filename. However, in the case of photos, there is typically little or no information beyond the pixels in the images themselves. This makes it harder for a computer to identify and categorize what is in a photo. There are some things a computer can do well, like recognize rigid objects and handwritten digits. For other classes of objects, this is a daunting task, because the average toddler is better at understanding what is in a photo than the world’s most powerful computers running state of the art algorithms.

This past October the state of the art seemed to move things a bit closer to toddler performance. A system which used deep learning and convolutional neural networks easily beat out more traditional approaches in the ImageNet computer vision competition designed to test image understanding. The winning team was from Professor Geoffrey Hinton’s group at the University of Toronto.

We built and trained models similar to those from the winning team using software infrastructure for training large-scale neural networks developed at Google in a group started by Jeff Dean and Andrew Ng. When we evaluated these models, we were impressed; on our test set we saw double the average precision when compared to other approaches we had tried. We knew we had found what we needed to make photo searching easier for people using Google. We acquired the rights to the technology and went full speed ahead adapting it to run at large scale on Google’s computers. We took cutting edge research straight out of an academic research lab and launched it, in just a little over six months. You can try it out at photos.google.com.

Why the success now? What is new? Some things are unchanged: we still use convolutional neural networks -- originally developed in the late 1990s by Professor Yann LeCun in the context of software for reading handwritten letters and digits. What is different is that both computers and algorithms have improved significantly. First, bigger and faster computers have made it feasible to train larger neural networks with much larger data. Ten years ago, running neural networks of this complexity would have been a momentous task even on a single image -- now we are able to run them on billions of images. Second, new training techniques have made it possible to train the large deep neural networks necessary for successful image recognition.

We feel it would be interesting to the research community to discuss some of the unique aspects of the system we built and some qualitative observations we had while testing the system.

The first is our label and training set and how it compares to that used in the ImageNet Large Scale Visual Recognition competition. Since we were working on search across photos, we needed an appropriate label set. We came up with a set of about 2000 visual classes based on the most popular labels on Google+ Photos and which also seemed to have a visual component, that a human could recognize visually. In contrast, the ImageNet competition has 1000 classes. As in ImageNet, the classes were not text strings, but are entities, in our case we use Freebase entities which form the basis of the Knowledge Graph used in Google search. An entity is a way to uniquely identify something in a language-independent way. In English when we encounter the word “jaguar”, it is hard to determine if it represents the animal or the car manufacturer. Entities assign a unique ID to each, removing that ambiguity, in this case “/m/0449p” for the former and “/m/012x34” for the latter. In order to train better classifiers we used more training images per class than ImageNet, 5000 versus 1000. Since we wanted to provide only high precision labels, we also refined the classes from our initial set of 2000 to the most precise 1100 classes for our launch.

During our development process we had many more qualitative observations we felt are worth mentioning:

1) Generalization performance. Even though there was a significant difference in visual appearance between the training and test sets, the network appeared to generalize quite well. To train the system, we used images mined from the web which did not match the typical appearance of personal photos. Images on the web are often used to illustrate a single concept and are carefully composed, so an image of a flower might only be a close up of a single flower. But personal photos are unstaged and impromptu, a photo of a flower might contain many other things in it and may not be very carefully composed. So our training set image distribution was not necessarily a good match for the distribution of images we wanted to run the system on, as the examples below illustrate. However, we found that our system trained on web images was able to generalize and perform well on photos.

A typical photo of a flower found on the web.
A typical photo of a flower found in an impromptu photo.

2) Handling of classes with multi-modal appearance. The network seemed to be able to handle classes with multimodal appearance quite well, for example the “car” class contains both exterior and interior views of the car. This was surprising because the final layer is effectively a linear classifier which creates a single dividing plane in a high dimensional space. Since it is a single plane, this type of classifier is often not very good at representing multiple very different concepts.

3) Handling abstract and generic visual concepts. The system was able to do reasonably well on classes that one would think are somewhat abstract and generic. These include "dance", "kiss", and "meal", to name a few. This was interesting because for each of these classes it did not seem that there would be any simple visual clues in the image that would make it easy to recognize this class. It would be difficult to describe them in terms of simple basic visual features like color, texture, and shape.

Photos recognized as containing a meal.
4) Reasonable errors. Unlike other systems we experimented with, the errors which we observed often seemed quite reasonable to people. The mistakes were the type that a person might make - confusing things that look similar. Some people have already noticed this, for example, mistaking a goat for a dog or a millipede for a snake. This is in contrast to other systems which often make errors which seem nonsensical to people, like mistaking a tree for a dog.

Photo of a banana slug mistaken for a snake.
Photo of a donkey mistaken for a dog.

5) Handling very specific visual classes. Some of the classes we have are very specific, like specific types of flowers, for example “hibiscus” or “dhalia”. We were surprised that the system could do well on those. To recognize specific subclasses very fine detail is often needed to differentiate between the classes. So it was surprising that a system that could do well on a full image concept like “sunsets” could also do well on very specific classes.

Photo recognized as containing a hibiscus flower.
Photo recognized as containing a dahlia flower.
Photo recognized as containing a polar bear.
Photo recognized as containing a grizzly bear.

The resulting computer vision system worked well enough to launch to people as a useful tool to help improve personal photo search, which was a big step forward. So, is computer vision solved? Not by a long shot. Have we gotten computers to see the world as well as people do? The answer is not yet, there’s still a lot of work to do, but we’re closer.

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..

Friday, January 20, 2017

Add a Hibernate button to shutdown screen

For all those who hibernate their pc, this trick comes handy. Traditionally, to hibernate our PC, hold down the shift key on the shut down screen, the Stand by button changes to Hibernate then we click on it. This trick adds a Hibernate button to the Shut down screen. Now you have all four buttons on one shot, no need to press Shift key.

The below pictures will explain more clearly.

Before:-



After:-

After performing the trick

Steps:-
We have to make some changes to the registry.
As a word of caution, take a back-up of your registry.
Now, To add the button, download show_hibernate.zip and execute the registry file inside it.
To add the button, download hide_hibernate.zip and execute the registry file inside it.

Click to download the documents:


Reblog this post [with Zemanta]
Read More..

Friday, January 13, 2017

A Comparison of Five Google Online Courses



Google has taught five open online courses in the past year, reaching nearly 400,000 interested students. In this post I will share observations from experiments with a year’s worth of these courses. We were particularly surprised by how the size of our courses evolved during the year; how students responded to a non-linear, problem-based MOOC; and the value that many students got out of the courses, even after the courses ended.

Observation #1: Course size
We have seen varying numbers of registered students in the courses. Our first two courses (Power Searching versions one and two) garnered significant interest with over 100,000 students registering for each course. Our more recent courses have attracted closer to 40,000 students each. It’s likely that this is a result of initial interest in MOOCs starting to decline as well as students realizing that online courses require significant commitment of time and effort. We’d like other MOOC content aggregators to share their results so that we can identify overall MOOC patterns.

*based on surveys sent only to course completers. Other satisfaction scores represent aggregate survey results sent to all registrants.

Observation #2: Completion rates
Comparing these five two-week courses, we notice that most of them illustrate a completion rate (measured by the number of students who meet the course criteria for completion divided by the total number of registrants) of between 11-16%. Advanced Power Searching was an outlier at only 4%. Why? A possible answer can be found by comparing the culminating projects for each course: Power Searching consisted of students completing a multiple choice test; Advanced Power Searching students completed case studies of applying skills to research problems. After grading their work, students also had to solve a final search challenge.

Advanced Power Searching also differed from all of the other courses in the way it presented content and activities. Power Searching offered videos and activities in a highly structured, linear path; Advanced Power Searching presented students with a selection of challenges followed by supporting lessons. We observed a decreasing number of views on each challenge page similar to the pattern in the linear course (see figure 1).
Figure 1. Unique page views for Power Searching and Advanced Power Searching

Students who did complete Advanced Power Searching expressed satisfaction with the course (95% of course completing students would recommend the course to others, compared with 94% of survey respondents from Power Searching). We surmise that the lower completion rate for Advanced Power Searching compared to Power Searching could be a result of the relative difficulty of this course (it assumed significantly more foundational knowledge than Power Searching), the unstructured nature of the course, or a combination of these and other factors.

Even though completion rates seem low when compared with traditional courses, we are excited about the sheer number of students we’ve reached through our courses (over 51,000 earning certificates of completion). If we offered the same content to classrooms of 30 students, it would take over four and a half years of daily classes to teach the same information!

Observation #3: Students have varied goals
We would also like to move the discussion beyond completion rates. We’ve noticed that students register for online courses for many different reasons. In Mapping with Google, we asked students to select a goal during registration. We discovered that
  • 52% of registrants intended to complete the course
  • 48% merely wanted to learn a few new things about Google’s mapping tools
Post-course surveys revealed that
  • 78% of students achieved the goal they defined at registration
  • 89% of students learned new features of Google Maps
  • 76% reported learning new features of Google Earth
Though a much smaller percentage of students completed course requirements, these statistics show that many of the students attained their learning goals.

Observation #4: Continued interest in post-course access
After each course ended, we kept many of the course materials (videos, activities) available. Though we removed access to the forums, final projects/assessments, and teaching assistants, we have seen significant interest in the content as measured by Google and YouTube Analytics. The Power Searching course pages have generated nearly three million page views after the courses finished; viewers have watched over 160,000 hours (18 years!) of course videos. In the two months since Mapping with Google finished, we have seen over 70,000 unique visitors to the course pages.

In all of our courses, we saw a high number of students interested in learning online: 96% of Power Searching participants agreed or strongly agreed that they would take a course in a similar format. We have succeeded in teaching tens of thousands of students to be more savvy users of Google tools. Future posts will take an in-depth look at our experiments with self-graded assessments, community elements that enhance learning, and design elements that influence student success.
Read More..

Wednesday, January 11, 2017

How to access a remote computer using TeamViewer

access a remote computer using TeamViewer
Want to access friend’s system over internet but wondering how to do that? Here is a simple way. TeamViewer is the fast, simple and friendly solution for remote access over the Internet - all applications in one single, very affordable module. TeamViewer establishes connections to any PC or server all around the world within just a few seconds. You can remote control your partner’s PC as if you were sitting right in front of it.

Advantages of TeamViewer:
  • Using this you can instantly take control over a computer anywhere on the Internet, even through firewalls.
  • Perform both remote access and remote desktop sharing.
  • No installation required, just use it fast and secure.
  • You can also send/transfer or run files between the two connected computers.
  • It also enables you to chat with the other user.
  • All this features for free.
How to use it:

  1. You just need to download two files, one is the TeamViewer_setup that you can either install or run live on your system to take control of remote system.
  2. Other is the teamviewerqs which is the client that is required to be run on the remote system.
  3. Run your setup and ask your friend to run his.
  4. Enter his ID in your Create Session ID box (as shown). Click “connect to partner”.
  5. It will ask for your partner’s password, enter that in that box.
  6. This is it, connection has been setup and you can use his desktop and do anything you want.
  7. Below is the screenie of the remote system.
access a remote computer using TeamViewer
Read More..

Tuesday, January 10, 2017

How to make a Computer Game

Read More..

Sunday, January 8, 2017

How a Victorian mathematics don became a digital pioneer

"With a steely glare, a starched collar and a pair of truly prodigious sideburns, he is the digital pioneer you have almost certainly never heard of. Now, 200 years after his birth, George Boole is finally to get the acclaim he deserves." So begins a recent article in The Guardian. Well of course, if youre a computer scientist, you almost certainly have heard of George Boole; he after all was the creator of Boolean logic. However, thats probably all you know so there will be much about him that youre not aware of. As with Charles Babbage, Ada Lovelace, and of course Alan Turing its good to see these formerly obscure digital pioneers getting the public recognition they so deserve. Perhaps as our society becomes more and more dependent on computers were starting to realise that these people are every bit as important as Galileo, Newton, Darwin, Faraday,...

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

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

Read More..

Monday, January 2, 2017

Using the Raspberry Pi as a Web Server Media Server and Torrent Box

So youve set your Raspberry Pi up.
If not you might want to check out this page first.
So now you want to set your Raspberry Pi up as a media/web/everything else server.

Before any of these, make sure your raspberry pi ip address is static. You can set this by opening up a terminal and typing in:
sudo nano /etc/network/interfaces

(Feel free to use gedit or vim or whatever you want. I like vim)
You should now be looking at a file. Change the line:
iface eth0 inet dhcp
To:
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.254

where the gateway is your router and the address is the ip address you want. Save the file and reboot (sudo reboot) and now your ip should be static.

Luckily, SSH is already enabled on the Raspbian image so we wont go into that. However, if you want to SSH externally, you should install something like SSHGuard for protection and then in your router config redirect port 22 traffic to your Raspberry Pi.


Section 1: Webserver

Installing apache is easy. Just open a terminal and type:
sudo apt-get install apache2

This will set up a webserver for you with the files at /var/www being your web directory. Modify those files how you feel like and if you want to make it publicly accessible then configure your router to forward port 80 to your raspberry pis ip address.

Section 2: VNC

This is an optional thing since you can port X over SSH. But if you want vnc. All you have to do is open up a terminal and type:
sudo apt-get install tightvncserver

When it is finished installing it should ask for a password. If it doesnt or you need to change it. Just type vncpasswd to reset it.
Then type tightvncserver and a new instance will start. You can kill it by typing tightvncserver -kill :1

To use this externally, you will have to open up port 5801 (for the first instance, 5802 for the second, etc.)

Section 3: Media Server

Start off by mounting all of your external HDDs. If you have a Raid array that is great, if not, I have a handy little hack for you.
edit fstab by opening up a terminal and typing:
sudo nano /etc/fstab
Add each hard drive to the file, mine looks like this:
/dev/sda1 /media/Kingsley ntfs-3g defaults 0 0
/dev/sdb1 /media/HarvardMulligan ntfs-3g defaults 0 0
/dev/sdc1 /media/Moloch ntfs-3g defaults 0 0

(Make sure the folders in /media exist and their permissions are set properly with chmod, otherwise this wont work)

You really should set up a RAID array or something, but lets say you like to live by the seat of your pants and dont care if one of your HDDs fail and you want to access them all at the same time in one convenient directory. To do this you can use mhddfs. Install it by typing:
sudo apt-get install mhddfs

When its done installing, open fstab back up and after the lines with your HDD, type in something like what is shown below:
mhddfs#/media/Kingsley,/media/HarvardMulligan,/media/Moloch /media/ALLOFIT fuse defaults,allow_other 0 0

So my final fstab file has this at the bottom:
/dev/sda1 /media/Kingsley ntfs-3g defaults 0 0
/dev/sdb1 /media/HarvardMulligan ntfs-3g defaults 0 0
/dev/sdc1 /media/Moloch ntfs-3g defaults 0 0
mhddfs#/media/Kingsley,/media/HarvardMulligan,/media/Moloch /media/ALLOFIT fuse defaults,allow_other 0 0





where mhddfs mounts all of the drives to /media/ALLOFIT (which I previously created and set permissions for) and I can write to that and mhddfs will figure out where to put it for me.
Now just sudo reboot

Interesting tidbit: You can use sshfs (their is a Windows version call win-sshfs) to access these drives securely through ssh. This way you dont have to worry about Samba and you can access these files graphically using the internet.

Section 4: Torrent Box

So now you want to be able to torrent (lets assume completely legally) things directly to your server/external HDDs.
Simply install transmission by opening up a terminal and typing
sudo apt-get install transmission-daemon

Now we need to edit some settings, stop the daemon and open up the settings file by typing:
sudo service transmission-daemon stop
and
sudo nano /etc/transmission-daemon/settings.json

You will need to change a couple of settings.
Change your download directory to where you want your downloads, I use my external HDDs:  "download-dir": "/media/ALLOFIT",
Now to set up some security. Change the following text requires the ""s but numbers and true/false dont:
"rpc-authentication-required": true,
"rpc-enabled": true,
"rpc-password": "YourPasswordHere",
"rpc-port": 6669,
"rpc-username": "YourUserNameHere",

You can change the port to anything but its probably a good idea to change it from the default to avoid brute force script kiddies.
Now start the daemon back up by typing
sudo service transmission-daemon start

Now open up a webbrowser on any computer in your network and type in your raspberry pis ip address followed by :port. Ex: 192.168.1.10:6691
If you want to access this externally, just forward the port you chose to your raspberry pi ip address in your router config.

Now you are done.

To use transmission to its fullest potential and automatically download media:
http://stevenhickson.blogspot.com/2013/03/automatically-downloading-torrents-with.html


Check out my other Raspberry Pi Fixes/How tos:
http://stevenhickson.blogspot.com/2012/08/setting-up-omxplayer-gui-on-raspberry-pi.html
http://stevenhickson.blogspot.com/2012/10/fixing-raspberry-pi-crashes.html

Consider donating to further my tinkering.


Places you can find me
Read More..

Saturday, December 24, 2016

Double click on a drive opens in new window

Problem:
When i double-click on a drive, it opens in new window. What is the problem, Is it because of a virus. Please help me.

Solution:
  • Open any explorer window, Click on Tools >> Folder options >> View.
  • Click on restore defaults.
If this does not solve your problem the it may be because of a virus attack.
You can perform the following steps to get rid of this.

Solution 1
  1. Open start menu and click Run.
  2. Type regsvr32 /i shell32.dll
  3. Click Ok and if this message shows “DllRegisterServer and DllInstall in shell32.dll succeeded” that means the problem is solved.

Solution 2
  1. In Run type regedit.exe to open the registry editor.
  2. Traverse to HKEY_CLASSES_ROOT/Directory/Shell
  3. Double click on the default value on right and set it as “none”.
  4. Repeat the procedure for the key HKEY_CLASSES_ROOT/Drive/Shell.

Solution 3
Alternatively, you can download a registry file and merge it with your registry by double clocking it. Reboot your system after merging the file.
One of the methods listed above will definitely solve your problem.
Read More..

Friday, December 23, 2016

Making online learning even easier with a re envisioned Course Builder



(Cross-posted on the Google for Education blog)

The Course Builder team believes in enabling new and better ways to learn (for both the instructor and learner). Todays release of Course Builder v1.10 furthers these goals in three ways, by being easier to use, embeddable and applicable to more types of content.

Easier to use
We took a step back and re-envisioned the menus and navigation of the administrative interface based on the steps instructors take as they create a course. These are designed to help you through the process of creating, styling, publishing and managing your courses. This re-imagined design gives a solid foundation for future versions of Course Builder.
A completely redesigned navigation simplifies content authoring and configuration.
To support this redesign, we’ve also completely revamped our documentation. There’s now one home for all of Course Builder’s materials: Google Open Online Education. Here, you’ll find everything you need to conceptualize and construct your content, create a course using Course Builder, and even develop new modules to extend Course Builder’s capabilities. The content now reflects the latest features and organization. This re-imagined design gives a solid foundation for future versions of Course Builder.

Embeddable assessment support
What if you want to use some of Course Builder’s features but already have an existing learning site? To help with these situations, Course Builder now supports embeddable assessments (graded questions and answers with an optional due date). Simply create your assessments in Course Builder, copy the JavaScript snippet and paste it on any site. Your users will be able to complete the assessments from the comfort of your existing site and you’ll be able to benefit from Course Builder’s per-question feedback, auto-grading and analytics with just two short lines of code that are automatically generated for you.

We started with embeddable assessments because evaluation is so important to learning, but we don’t plan to stop there. Watch for additional embeddable components in the future.

Applicable to more types of content
Many types of online learning content, like tutorials, exercises and documentation, are a lot like online courses. For instance, they might involve presenting content to users, having them do exercises or assessments and allowing them to stop and return later. Yet, you might not think of them as traditional courses.

To make Course Builder a better fit for a broader set of online content, we’ve added a new “guides” experience. Guides are a new way for students to browse and consume your content. Compared to typical online courses -- which can enforce a strict linear path (from unit 1 to unit 2, etc.) -- guides present your content as a non-numbered list. Users are free to enter and exit in any order. It also allows you to show the content for many courses together.

You could imagine each guide being a documentation page or tutorial section. Guides also work with any existing Course Builder units and can be made available by simply enabling that feature in the dashboard. Here are a couple of our courses, when viewed as guides:

Within each guide, the user is guided through the steps, which could be portions of a docs page or lessons in a unit, as in this example from the “Power Searching with Google” sample course:

By letting users jump in and out of the content as they like, guides are ideally suited to the on-the-go learner and look great on phones and tablets. It’s our first foray into responsive mobile design... but it won’t be our last.

Guides currently support public courses, but we’ll be adding registration, enhanced statefulness and interface customization, as well as elements of dynamic learning (think of a personalized list of guides).

This release has focused on making Course Builder easier to use and more relevant. It sets up the framework to give future features a natural home. It adds embeddable assessments to make Course Builder useful in more places. And it introduces guides, a new, less linear format for consuming content.

For a full list of features, see the release notes, and let us know what you think. Keep on learning!
Read More..

Wednesday, December 7, 2016

Do you want to live in a Smart City

Stephen Poole in the The Guardian has written a very interesting and thought provoking long article The truth about smart cities: In the end, they will destroy democracy that presents both sides of the vision of the future smart city; the benefits of a highly connected society and infrastructure and the potential pitfalls. With online privacy and data security such hot topics at the moment its certainly easy to see how the smart city of the future could be fraught with dangers. I recommend you read it.




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

IFTTT

Put the internet to work for you.

Delete or edit this Recipe

Read More..

Saturday, December 3, 2016

All the News thats Fit to Read A Study of Social Annotations for News Reading



News is one of the most important parts of our collective information diet, and like any other activity on the Web, online news reading is fast becoming a social experience. Internet users today see recommendations for news from a variety of sources; newspaper websites allow readers to recommend news articles to each other, restaurant review sites present other diners’ recommendations, and now several social networks have integrated social news readers.

With news article recommendations and endorsements coming from a combination of computers and algorithms, companies that publish and aggregate content, friends and even complete strangers, how do these explanations (i.e. why the articles are shown to you, which we call “annotations”) affect users selections of what to read? Given the ubiquity of online social annotations in news dissemination, it is surprising how little is known about how users respond to these annotations, and how to offer them to users productively.

In All the News that’s Fit to Read: A Study of Social Annotations for News Reading, presented at the 2013 ACM SIGCHI Conference on Human Factors in Computing Systems and highlighted in the list of influential Google papers from 2013, we reported on results from two experiments with voluntary participants that suggest that social annotations, which have so far been considered as a generic simple method to increase user engagement, are not simple at all; social annotations vary significantly in their degree of persuasiveness, and their ability to change user engagement.
News articles in different annotation conditions
The first experiment looked at how people use annotations when the content they see is not personalized, and the annotations are not from people in their social network, as is the case when a user is not signed into a particular social network. Participants who signed up for the study were suggested the same set of news articles via annotations from strangers, a computer agent, and a fictional branded company. Additionally, they were told whether or not other participants in the experiment would see their name displayed next to articles they read (i.e. “Recorded” or “Not Recorded”).

Surprisingly, annotations by unknown companies and computers were significantly more persuasive than those by strangers in this “signed-out” context. This result implies the potential power of suggestion offered by annotations, even when they’re conferred by brands or recommendation algorithms previously unknown to the users, and that annotations by computers and companies may be valuable in a signed-out context. Furthermore, the experiment showed that with “recording” on, the overall number of articles clicked decreased compared to participants without “recording,” regardless of the type of annotation, suggesting that subjects were cognizant of how they appear to other users in social reading apps.

If annotations by strangers is not as persuasive as those by computers or brands, as the first experiment showed, what about the effects of friend annotations? The second experiment examined the signed-in experience (with Googlers as subjects) and how they reacted to social annotations from friends, investigating whether personalized endorsements help people discover and select what might be more interesting content.

Perhaps not entirely surprising, results showed that friend annotations are persuasive and improve user satisfaction of news article selections. What’s interesting is that, in post-experiment interviews, we found that annotations influenced whether participants read articles primarily in three cases: first, when the annotator was above a threshold of social closeness; second, when the annotator had subject expertise related to the news article; and third, when the annotation provided additional context to the recommended article. This suggests that social context and personalized annotation work together to improve user experience overall.

Some questions for future research include whether or not highlighting expertise in annotations help, if the threshold for social proximity can be algorithmically determined, and if aggregating annotations (e.g. “110 people liked this”) help increases engagement. We look forward to further research that enable social recommenders to offer appropriate explanations for why users should pay attention, and reveal more nuances based on the presentation of annotations.
Read More..

Wednesday, November 30, 2016

Should computer scientists have a conscience

A recent article in The Atlantic titled The Moral Failure of Computer Scientists argues that computer scientists should take on the surveillance state rather than providing governments with the tools to strip away citizens privacy. Phillip Rogaway, a professor of computer science at the University of California, Davis, puts forward his opinion in an interview with journalist Kaveh Waddell.
My colleague Mark Wilson brought this to my attention.

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

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

Read More..

Sunday, November 27, 2016

Do you want a computer for 9


Cant afford a Raspbery Pi ($35), well they have a competitor now. The ultra cheap CHIP; a 1GHz processor, 512MB RAM, with 4GB storage, WiFi, Bluetooth, support for most monitors and even a mobile capacity. It runs Linux and therefore supports many free productivity apps. As you can see from the picture its very small and so can be easily embedded in pieces of equipment. CHIP is a Kick Starter project and be honest for just $9 (US) can you not afford to own one.

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

IFTTT

Put the internet to work for you.

Delete or edit this Recipe

Read More..

Friday, November 25, 2016

How to delete the files of a software which is partly installed

Many a times when we install a software, the computer hangs or there is an accidental shutdown due to power-cut or due to any other reason the installation remains incomplete and the software is installed partly. Sometimes, we cannot delete the files of this partly installed software. Or if we delete those files manually, the registry values entered by this software is not removed. To overcome all these problems, Microsoft provides a small utility- "Microsoft Windows Installer Cleanup Utility"

This utility allows you to safely remove these files it doesnt damage any other programs. And you can start with a fresh installation.
Click to download the application(271.48 KB)
Read More..

Monday, November 21, 2016

Download a set of 100 high resolution wallpapers for your desktop

High resolution wallpapers for desktop
This is a set of high resolution wallpapers including the above wallpapers and more.
Click to download the wallpapers.
Read More..

Wednesday, November 9, 2016

Take a better selfie with Lily

Selfie sticks were the must have Xmas gift last year and now a team out of the UC Berkeley robotics lab, who built the first prototype using a Raspberry Pi and an Arduino, have developed the Lily camera drone. Watch the video below to see how it works but basically it flies itself and can take video or stills of its owner. Its on my Christmas list.



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

IFTTT

Put the internet to work for you.

Delete or edit this Recipe

Read More..

Sunday, November 6, 2016

Calculating Ada The Countess of Computing

With Ada Lovelace Day fast approaching (Oct 13) the BBC has released a timely documentary all about her called "Calculating Ada: The Countess of Computing". This is the first documentary Ive seen dedicated to Ada Lovelace and I learnt a lot. For instance I didnt know that she lost a fortune gambling on horse racing. She believed she could calculate the odds better than the bookmakers - she was wrong. The doco is available on YouTube, though I expect it will be taken down soon; otherwise it can be viewed on the BBc iPlayer.


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

IFTTT

Put the internet to work for you.

Turn off or edit this Recipe

Read More..

Thursday, November 3, 2016

Creating a templated Binary Search Tree Class in C

Creating a basic template Tree Class in C++
(Works in Linux and Windows)

If you just want the code and not the walkthrough, it is attached at the end (I use the GNU GPL license, so do whatever you want with the code as long as you mention me).

There a multiple benefits of creating a Tree class based on a template. With a template, the tree can be a container for anything while still being fairly clean code. We will also create this class to be easily inherited for other trees such as an AVL and Huffman tree (which we will implement later).

A tree is a widely used data structure which organizes a set of nodes containing data. More can be found on it here: http://en.wikipedia.org/wiki/Tree_%28data_structure%29

This tree will be a Binary Search Tree; however, it will be easily inheritable so that other trees (Binary trees, such as AVL and Red-Black) can be defined based on it.

First we will set up our Node as a holder for the data and tree information such as the parent and connected nodes (the leaves). I overload the < operator so that we can search and sort this tree using the c++ algorithm include if we so desire.

template <class T>
class Node {
public:
    T data;
    Node *left, *right, *parent;

    Node() {
        left = right = parent = NULL;
    };
    Node(T &value) {
        data = value;
    };
    ~Node() {
    };   
    void operator= (const Node<T> &other) {
        data = other.data;
    };
    bool operator< (T &other) {
        return (data < other);
    };
};

Our tree will basically just be a bunch of these Nodes pointing to each other, with some functions to manage the data structure.

template <class T>
class Tree {
public:
    Tree() {
        root = NULL;
    };

    ~Tree() {
        m_destroy(root);
    };

    //We will define these all as virtuals for inherited trees (like a Huffman Tree and AVL Tree shown later)
    virtual void insert(T &value) {
        m_insert(root,NULL,value);
    };
    virtual Node<T>* search(T &value) {
        return m_search(root,value);
    };
    virtual bool remove(T &value) {
        return m_remove(root,value);
    };
    virtual bool operator< (Tree<T> &other) {
        return (root->data < other.first()->data);
    };
    void operator= (Tree<T> &other) {
        m_equal(root,other.first());
    };
    Node<T>*& first() {
        return root;
    };


protected:
    //this will be our root node and private functions
    Node<T> *root;
    void m_equal(Node<T>*& node, Node<T>* value) {
        if(value != NULL) {
            node = new Node<T>();
            *node = *value;
            if(value->left != NULL)
                m_equal(node->left, value->left);
            if(value->right != NULL)
                m_equal(node->right, value->right);
        }
    }

    void m_destroy(Node<T>* value) {
        if(value != NULL) {
            m_destroy(value->left);
            m_destroy(value->right);
            delete value;
        }
    };
    void m_insert(Node<T> *&node, Node<T> *parent, T &value) {
        if(node == NULL) {
            node = new Node<T>();
            *node = value;
            node->parent = parent;
        } else if(value < node->data) {
            m_insert(node->left,node,value);
        } else
            m_insert(node->right,node,value);
    };
    void m_insert(Node<T> *&node, Node<T> *parent, Tree<T> &tree) {
        Node<T> *value = tree.first();
        if(node == NULL) {
            node = new Node<T>();
            *node = *value;
            node->parent = parent;
        } else if(value->data < node->data) {
            m_insert(node->left,tree);
        } else
            m_insert(node->right,tree);
    };
    Node<T>* m_search(Node<T> *node, T &value) {
        if(node == NULL)
            return NULL;
        else if(value == node->data)
            return node;
        else if(value < node->data)
            return m_search(node->left,value);
        else
            return m_search(node->right,value);
    };

    bool m_remove(Node<T> *node, T &value) {
        //messy, need to speed this up later
        Node<T> *tmp = m_search(root,value);
        if(tmp == NULL)
            return false;
        Node<T> *parent = tmp->parent;
        //am i the left or right of the parent?
        bool iamleft = false;
        if(parent->left == tmp)
            iamleft = true;
        if(tmp->left != NULL && tmp->right != NULL) {
            if(parent->left == NULL || parent->right == NULL) {
                parent->left = tmp->left;
                parent->right = tmp->right;
            } else {
                if(iamleft)
                    parent->left = tmp->left;
                else
                    parent->right = tmp->left;
                T data = tmp->right->data;
                delete tmp;
                m_insert(root,NULL,data);
            }
        } else if(tmp->left != NULL) {
            if(iamleft)
                parent->left = tmp->left;
            else
                parent->right = tmp->left;
        } else if(tmp->right != NULL ) {
            if(iamleft)
                parent->left = tmp->right;
            else
                parent->right = tmp->right;
        } else {
            if(iamleft)
                parent->left = NULL;
            else
                parent->right = NULL;
        }
        return true;
    };
};

And thats all we need for a basic binary search tree. The full code is shown below

Tree.h 

Consider donating to further my tinkering.


Places you can find me
Read More..

Wednesday, November 2, 2016

Projecting without a projector sharing your smartphone content onto an arbitrary display



Previously, we presented Deep Shot, a system that allows a user to “capture” an application (such as Google Maps) running on a remote computer monitor via a smartphone camera and bring the application on the go. Today, we’d like to discuss how we support the opposite process, i.e., transferring mobile content to a remote display, again using the smartphone camera.

Although the computing power of today’s mobile devices grows at an accelerated rate, the form factor of these devices remains small, which constrains both the input and output bandwidth for mobile interaction. To address this issue, we investigated how to enable users to leverage nearby IO resources to operate their mobile devices. As part of the effort, we developed Open Project, an end-to-end framework that allows a user to “project” a native mobile application onto an arbitrary display using a smartphone camera, leveraging interaction spaces and input modality of the display. The display can range from a PC or laptop monitor, to a home Internet TV and to a public wall-sized display. Via an intuitive, projection-based metaphor, a user can easily share a mobile application by projecting it onto a target display.

Open Project is an open, scalable, web-based framework for enabling mobile sharing and collaboration. It can turn any computer display projectable instantaneously and without deployment. Developers can add support for Open Project in native mobile apps by simply linking a library, requiring no additional hardware or sensors. Our user participants responded highly positively to Open Project-enabled applications for mobile sharing and collaboration.


Read More..