Git Product home page Git Product logo

pixels_seminar's People

Contributors

advait-0 avatar amanchhaparia avatar apr0t0 avatar asc91 avatar chinmaymundane avatar dhairyashah1 avatar gautam-dev-maker avatar hardikbhortakke avatar harshbhosale01 avatar hashmis79 avatar ishanair09 avatar khushi-balia avatar manndoshi avatar meshtag avatar nachtspyder04 avatar ninja3011 avatar om-doiphode avatar pritk99 avatar raghav323 avatar rajgupta17 avatar reshmika-nambiar avatar ris-bali avatar ritika128 avatar sakshi-0311 avatar sarrah-basta avatar satacker avatar shahpratham avatar spnetic-5 avatar superchamp234 avatar tejal-19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pixels_seminar's Issues

Transcoding from Python to Industry standard C++

The aim of the pixels seminar is to introduce the juniors with the basic concepts of image processing and computer vision. We started with python to keep it as simple as possible. But I feel the need to move from python to C++. C++ is complicated but is an industry standard.
If juniors were to introduce to C++ in this seminar than python, then they might be more willing to go through large c++ codebase in GSoC or any other programs or competitions. With the inclusion of C++, we can also introduce build systems (which honestly is the need of an hour).
This repository can also act as basic template for CV people getting started with C++.

@meshtag @amanchhaparia @SAtacker kindly share your opinion on this.

Also keep in account that at SRA, we advocate progress, regardless of how challenging or difficult it may seem at first.

Port to C++ : Playing with Image arrays

Is your feature request related to a problem? Please describe.
Current implementation for working with image arrays is in Python, as discussed in this thread, we need to port it to C++.

Describe the solution you'd like

  • Make use of cv::Mat's inbuilt slicing functionalities for demonstration purpose(s).
  • Add an implementation using for loops as well, this is done for the purpose of making students aware of pointer manipulation and its arithmetic in C++.
  • Add a makefile to compile and build related executable(s).
  • Maintain a .md file for theoretical part (and depicting expected results) as well.

Makefiles don’t work on macOS

Describe the bug
Makefiles fail to work on macOS after #107. A libsdl2 error is raised.

To Reproduce
Steps to reproduce the behaviour:
0. Try this on macOS Sonoma

  1. Compile any code using Makefiles like 4_cv_basics/1_image_representation/Makefile.
  2. Get main.cpp:28:10: fatal error: 'SDL2/SDL.h' file not found

Expected behavior
The file should have compiled successfully to give an executable.

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS

Refactoring Convolution Filtering

The code 4_convolutions_filtering covers the following features:

  • Naive Convolutions
  • Convolutions using OpenCV
  • Separable Convolutions
  • Benchmarking for each of the above

This issue involves refactoring the provided convolution code into three separate files, each focusing on a specific aspect of convolution operations and creating a separate folder for benchmarking the results of each file. The goal is to is to enhance code modularity, readability, and maintainability by isolating different functionalities into distinct files. This would further reduce the complexity while understanding the code.
Benchmarking can be used solely for displaying the results and comparing the efficiency of different convolution approaches during the seminar. The code for benchmarking can be kept optional to explore.

Port to C++: Blob Detection

Is your feature request related to a problem? Please describe.
Current Blob Detection algorithm is implemented using Python, need to port to C++, as discussed in this thread

Describe the solution you'd like

  • Implement the blob detection using the necessary OpenCV C++ API.
  • Blob detection should have a option to run on webcam or on video depending on the argument provided while executing objectfile.
  • Add a Makefile to compile and build a executable.
  • Add a Readme.md explaining the algorithm in detail and should also contain the instruction for running the executable.

Port to C++ : Assignments related to PIXELS seminar

Is your feature request related to a problem? Please describe.
This feature request is created to keep a record of porting and potential addition of new assignments related to the seminar in C++ as discussed in this thread.

Describe the solution you'd like

  • Create a separate main folder for containing all assignments. Individual assignments related to specific topics might be grouped together inside the main parent folder of assignments.
  • You might chose to add reference links in individual questions, which may provide additional material on a related topic for that question (this is suggested solely for the purpose of providing more (potentially real world) info related to the topic asked in original question and hence, should not in any way lead to the solution).

Refactoring 4_cv_basics/1_image_representation/main.cpp file to reduce complexity

In the existing code of 1_image_representation, we are reading both the file header and the image information header, which include metadata about the BMP file beyond just the pixel data. This metadata includes information such as file size, pixel data offset, image dimensions, color depth, compression method, etc. I feel this metadata is unnecessary since our goal here is to read the pixel data and display the image. However, reading the complete header can also provide useful information for debugging or error handling.
If the purpose of this code is to only read the pixel data and display the image, the code could be optimized to skip reading unnecessary metadata. Since we want to reduce the complexity of this code there is no other option in my opinion so these are my suggestions:-

  • Skip unnecessary metadata reading
  • Directly read pixel data: Instead of reading the pixel data into a separate std::vector, we can directly render the pixel data from the file without storing it in memory.
  • We can also simplify error handling in my opinion.
    With these changes, we will only need one struct:-
struct BMPImage {
    uint32_t width;                 // Width of the image in pixels
    uint32_t height;                // Height of the image in pixels
    std::vector<uint8_t> pixels;    // Vector to store pixel data
};

@advait-0 and @PritK99 , Please suggest if there is any other way to reduce the complexity of the existing code other than removing metadata, otherwise we can go ahead with this.

Update Content: Image Representation.

Is your feature request related to a problem? Please describe.
The contents of the Image Representation are not upto the mark.

Describe the solution you'd like
The contents of the Image Representation should be updated and documentation format should also be updated.

Update the root README.md

Is your feature request related to a problem? Please describe.
We need to update the root level README.md as we add and port the contents to C++, as discussed in this thread.

Describe the solution you'd like
The README.md should be updated and follow the same standard as the other repository of the org, eg: Wall E

Port to C++ : Convolution and Filtering

Is your feature request related to a problem? Please describe.
Current implementation of convolution is in Python. As discussed in this thread, we need to port it (1D, 2D and separable convolution) to C++.

Describe the solution you'd like

  • Add a naive (using for loops by hand) as wells as proper (using native OpenCV API) implementation in C++.
  • Add a makefile to compile and build related executable(s).
  • Maintain a .md file for theoretical part.
  • (Optional) We might as well benchmark (using Google benchmarks) both implementations (Naive for loops vs OpenCV 's implementation) to give students a fair idea about the optimization provided by OpenCV. We can have a discussion on this point once all other tasks are complete.

Add Content: Build Systems

Is your feature request related to a problem? Please describe.
As discussed in the thread, Concepts of Build System should be added.

Describe the solution you'd like

  • Content should be added for manual creating and linking the object files.
  • Importance of build systems.
  • Add the contents for Makefile.
  • Add contents for Cmake.

Additional context
Can refer from here: Embedded Study Group Week 2.

Note: Content is not finalised and open for discussion.

Add Content: Image Storing Formats.

Is your feature request related to a problem? Please describe.
As discussed in the thread, It is important to have a familiarity of how images are store.

Describe the solution you'd like

  • Add the theory of basic image storing formats such as .bmp, .tiff, .jpg, png etc.
  • Implement a .cpp file on how image can be read from the bmp format.
    • Consider only 8 bit grayscale BitMap image (Since they are easy to read and contains only 2D form of data).
    • Use simple posix read() api to read the image bitmap file.
    • Directly storing the values of various attributes of image in struct is suggested.
  • A similar example can be added to demonstrate how to edit/write a grayscale bitmap image.
  • Add a Makefile to compile and build the executable.
  • Add a .md file explaining the theory and instructions to build and run the executables.

Note: Content is not finalised and open for discussion.

Port to C++ : OpenCV overview

Is your feature request related to a problem? Please describe.
We have a section covering some important introduction topics from OpenCV. This section covers all of them in Python atm, as discussed in thread thread, we need to port it to C++.

Describe the solution you'd like

  • Convert all relevant programs in this file to their equivalent C++ versions using OpenCV's native API wherever required.
  • Add theory related to OpenCV's C++ APIs in accordance with current Python APIs present inside the above mentioned file.
  • Create a makefile to build and compile related executable(s).
  • Maintain a .md file for theoretical part (and depicting expected results) as well.

Replacing Makefile with a shell script for OpenCV installation

Users who have freshly installed Ubuntu on their laptops may not have make , g++ or other essentials installed. To mitigate this problem, that may look simple but can create problems for those who are new to Linux environment, I suggest replacing Makefile with a shell script ( .sh script like we are using for Wall-E and MARIO) which will update their system as well as install the build-essential package on their laptops along with usual installation of OpenCV as well as its dependencies

Thank You

Port to C++: Morphological Transformation.

Is your feature request related to a problem? Please describe.
Current implementation of Morphological Transformation is in Python, it is needed to be ported in to C++ as discussed in this thread.

Describe the solution you'd like

  • Create a .cpp file performing morphological transformation by using necessary OpenCV C++ API.
  • Create a Makefile to compile and build the executable.
  • Create a Readme.md which contains the detailed explanation of the content similiar to jupyter notebook notes earlier, should contain the instructions to build and execute the code.

Add Content: C++ basic concepts for seminar.

Is your feature request related to a problem? Please describe.
Since the seminar is being ported to C++ as discussed in this thread, it is important to teach some important C++ concepts.

Describe the solution you'd like

  • Some advance concepts of C++ like handling 2D arrays/vector, pointer etc.

Note: Content is not finalised and open for discussion.

Add Content: Interpolations.

Is your feature request related to a problem? Please describe.
As discussed in the thread, concepts of interpolation can also be added.

Describe the solution you'd like

  • Create a implementations of interpolation from scratch using necessary OpenCV C++ API.
  • Add a Makefile to compile and build executables.
  • Add a .md file to explain the theory of interpolations and instructions to build and run the executables.

Additional context
Reference: Ancient Secrets of computer vision.

Note: Content is not finalised and open for discussion

Redesign a new File structure.

Is your feature request related to a problem? Please describe.
As we are moving the contents to c++ as discussed in this thread, it is important to redesign the existing file structure.

Describe the solution you'd like
I would like to propose the file structure as below:

File structure

.
├── 1_cpp_basic                             # Contents on the basic of cpp concepts like pointers.                             
├── 2_build_systems                         # Topics of build systems including Makefile and Cmake.
├── 3_git_github                            # Git Github basic contents.
├── 4_cv_basics                             # Contents of all the Computer Vision Fundamentals.
│   ├── image_representation                # Contents in markdown format for the basic image representation.
│   ├── Color spaces and conversion         # Introduction to image color spaces and their conversions.
│   │   ├── color_conversion.cpp            # Contain the C++ code for conversion between the colorspaces.
│   │   ├── Makefile                        # Includes build commands.
│   │   └── Readme.md                       # Detailed Explanation of the topic and its instructions for running the code.
│   ├── Playing with image coordinates      # Content on the OpenCV mat container.
│   ├── Convolution and filtering           # Contents on the convolution and filtering.
│   ├── Masking                             # Contents on the Masking.
│   ├── Morphological Transformation        # Contents on the morphological transformation.
│   └── Blob Detection                      # Mini project of blob detection.
├── Assignments                             # Contains the assignments 
├── assets                                  # Contains the images and gifs.
├──.gitignore                               # ignores the unnecessary build files.
├── LICENSE                                 # Licence for this project.
└── README.md                               # Contains documentation and topics of the repo.

Additional context
Reference from : Ancient Secrets of Computer Vision

Note: File structure is not finalised and open for discussion.

Port to C++: Masking

Is your feature request related to a problem? Please describe.
Current contents and implementation of masking is in Python. As discussed in the thread, it is needs to port to C++.

Describe the solution you'd like

  • Implement the masking operations using necessary OpenCV C++ API methods.
  • Create Makefile to compile and build the executables.
  • Add a .md file explaining the concepts and instructions for running the executables.

Eliminate the use of the cv namespace

Users especially those new to C++ often face confusion and difficulties in understanding the proper usage of OpenCV classes due to the common practice of using the cv namespace. To improve clarity and encourage best practices, I think it is suitable to eliminate the use of the cv namespace in our examples.

Possible solution to this problem could be:

  • Encouraging Explicit Namespace Usage: Update documentation and examples to explicitly use the cv:: prefix for OpenCV classes (e.g., cv::Mat, cv::VideoCapture) instead of relying on the cv namespace. This will also allow users to have a better understanding of the working of C++ as using namespaces abstracts some stuff.

Add Content: Example to read/write image data from scratch (without using any external library)

Is your feature request related to a problem? Please describe.
There are currently no examples of how data is stored in image files. Since all the codebase was in python, it didn't make any sense to add this, until the discussion in this thread.

Describe the solution you'd like

  • Consider only 8 bit grayscale BitMap image (Since they are easy to read and contains only 2D form of data).
  • Use simple posix read() api to read the image bitmap file.
  • Directly storing the values of various attributes of image in struct is suggested.
  • a single main.cpp (or any other name of choice) file may suffice for this purpose.
  • A similar example can be added to demonstrate how to edit/write a grayscale bitmap image.
  • Create a README.md for detailed theory and explanation of code and how to compile it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.