Skip to content
/ cs344 Public
forked from udacity/cs344

Introduction to Parallel Programming class code

Notifications You must be signed in to change notification settings

Adeemj/cs344

 
 

Repository files navigation

Work on Problem Set 1 on Google Colab GPU

This repository contains the necessary modifications to make the Problem Set compatible with Google Colab.

Opencv Installation on Google Colab

Install OpenCV from source. Here's how you can set up OpenCV:

Step 1: Installing required packages and tools

sudo apt update && sudo apt install -y g++ cmake make git libgtk2.0-dev pkg-config

Step 2: Download the source

git clone https://github.com/opencv/opencv.git

Step 3: Build and Install

mkdir -p build && cd build
cmake ../opencv -DBUILD_LIST=core,imgproc,imgcodecs 
make -j$(nproc) 
sudo make install

Step 4: Set Library Paths

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

Run Problem Set 1

Code Completion

Prior to building the application, ensure that you have implemented all necessary functionality within student_func.cu.

Compile the Codebase

Use the provided Makefile to compile the problem set:

make

Run the executable with the required arguments:

./HW1 {input image path}

Example:

./HW1 cinque_terre_small.jpg

Summary of Code Changes

  1. The Makefile has been updated to use correct paths and libraires.
  2. Removed dependencies on OpenCV's GUI modules since Google Colab runs on a headless server.
  3. OpenCV syntax in the codebase has been updated to comply with the latest API standards in OpenCV 4.x.

TODO

  1. Build with cmake

About

Introduction to Parallel Programming class code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Cuda 45.5%
  • C++ 41.9%
  • C 5.5%
  • Makefile 4.6%
  • CMake 2.5%