Howto: Reinstall Grub using Ubuntu Live CD

I recently installed Fedora 12 on my desktop alongside Ubuntu Karmic and Windows 7, however doing so I overwrite my grub which meant my Ubuntu system was hidden. To fix this is pretty simple..

Insert your Ubuntu 9.10 Live CD

Click “Try Ubuntu without any changes to your computer”

Once loaded click Applications > Accessories > Terminal

sudo fdisk -l That’s an L (not caps)

This displays all partitions on your system, in my case the installation of my Ubuntu system was /dev/sda5 so replace this for yours in the rest of the code.

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

If all goes successfully you should be done, try rebooting and see if your Ubuntu shows up.

Tags: , , , , , , , , ,
Posted in Fedora, Linux, Ubuntu · March 11th, 2010 · Comments (0)

Battlefield: Bad Company 2

Tags: , , , , , ,
Posted in Playstation 3 · March 8th, 2010 · Comments (0)

OpenCV – Adaptive Thresholding Webcam Example

#include "cv.h"
#include "highgui.h"
#include
#include 
 
#define DELAY 2
 
int main( int argc, char** argv )
{
  // Set up variables
  char window_name[] = "Adaptive Thresholding (Webcam)";
  char threshold[] = "Threshold";
  char methoddepparam[] = "Method-Dependent Param";
  CvCapture *capture = 0;
  IplImage *frame = cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1);
  IplImage *img = cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1);
  IplImage *imgdis = cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1);
  int quit = 0;
  int thresh = 230;	//initial value
  int mdparam = 3;	// "" 	   ""
 
  //set the camera capture
  capture = cvCaptureFromCAM(0);
 
  // create a new window with auto sizing
  cvNamedWindow(window_name, 1);
  // create a slider to control the max threshold value
  cvCreateTrackbar(threshold, window_name, &thresh, 255, NULL);
  // create a slider to control the max threshold value
  cvCreateTrackbar(methoddepparam, window_name, &mdparam, 60, NULL);
 
while(quit != 'q')
{
 
	//grab frame from webcam
	img = cvQueryFrame(capture);
 
	//convert input image to gray
  	cvCvtColor(img, frame, CV_BGR2GRAY);
 
	//apply the adaptive threshold algorithm
	cvAdaptiveThreshold(	frame, 				// source image
				imgdis, 			//destination image
				thresh, 			//max value (for cv_thresh_bin/inv)
				CV_ADAPTIVE_THRESH_MEAN_C, 	//adaptive algorithm (CV_ADAPTIVE_THRESH_MEAN_C || CV_ADAPTIVE_THRESH_GAUSSIAN_C)
				CV_THRESH_BINARY, 		//threshold type (CV_THRESH_BINARY || CV_THRESH_BINARY_INV)
				3, 				//blocksize (3,5,7..)
				mdparam);			//method-dependent param
 
    	// display frame
    	cvShowImage(window_name,imgdis);
 
	//check for q to quit
	quit = cvWaitKey(1);
 
    	// delay for a moment
    	cvWaitKey(DELAY);
 
}
  // before quitting it releases memory
  cvReleaseCapture(&capture);
  cvDestroyWindow(window_name);
 
  return 0;
}




Tags: , , , , , , ,
Posted in programming · February 17th, 2010 · Comments (0)

Pancake Day


Read the rest of this entry »

Posted in Miscellaneous · February 16th, 2010 · Comments (0)

Choices

“When faced with two choices, simply toss a coin.
It works not because it settles the question for you,
but because, in that brief moment when the coin is in the air,
you suddenly know what you are hoping for.”

Tags: ,
Posted in Life · February 15th, 2010 · Comments (0)

Yet Another OpenCV/Karmic error – symbol lookup error: /usr/local/lib/libhighgui.so.4

symbol lookup error: /usr/local/lib/libhighgui.so.4: undefined symbol: av_free_packet

To fix it simply make sure /usr/local/lib is in your library path by using the following command:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Tags: , , , , , , , , , ,
Posted in Ubuntu · February 4th, 2010 · Comments (0)

February – Spaced

Screenshot

Tags: , , , , ,
Posted in Software · February 4th, 2010 · Comments (0)

Howto fix: “error while loading shared libraries”

While installing opencv on an older version of debian for work I kept getting an error while loading shared libraries which turned out to be a pretty easy fix, just finding the libraries and adding them to the dynamic linker.

The libraries I was having trouble with below:
./blobtrack: error while loading shared libraries: libcxcore.so.1: cannot open shared object file: No such file or directory

ffmpeg
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

I used the ‘locate’ command to find where the libraries were eg:
locate libcxcore.so.1
This outputted a few locations of where the library was, I decided to use the /usr/local/lib version as both libraries I needed were in there and did the following command to add them to ld.so.conf and reload the dynamic linker:
sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf && ldconfig'

Tags: , , , , , , , , , , ,
Posted in Linux · February 2nd, 2010 · Comments (0)

2009 – Game of the Year

dragon-age-box-ps3-1252621656

I know I’m a bit late in posting this but before playing this Uncharted 2 would have been top spot maybe followed by Batman: Arkham Asylum but after grabbing a copy of this game less than 48 hours ago I’m pretty sure Dragon Age is the one. It brings back memories of games like Neverwinter Nights mixed with Baldurs Gate and maybe a hint of Mass Effect; all very distinctly BioWare games. The only thing letting it down at the moment for me is the lack of camera zoom and keyboard/mouse support for the PS3 version (all of which wouldn’t be an issue if I had brought the PC version of the game as the sales dude advised.)

Tags: , , , , , , , , , , ,
Posted in Miscellaneous · January 18th, 2010 · Comments (1)

Error: Dependency is not satisfiable: libstdc++5 (Ubuntu Karmic)

Error: Dependency is not satisfiable: libstdc++5

This is a simple fix, just grab the libstdc++5 package for your architecture from here:

http://packages.debian.org/stable/base/libstdc++5

Tags: , , , , , , ,
Posted in Ubuntu · December 14th, 2009 · Comments (1)

Twitter

Last.fm

Tags

9.10 64bit b2evo beta brains bristol computer vision drivers error export f11 facebook fedora fenway gmail gnome google grumbel guide hack howto i386 import indie install invite karmic Linux machine vision opencv open source PS3 robot Robotics screenshot setup terminal twitter Ubuntu wave windows wordpress xbox Xbox 360 zombies