Coder Social home page Coder Social logo

siddharth1698 / image-processing-to-find-the-brightest-area-in-astronomical-image-and-video-using-kadane-s-algorithm Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 1.06 MB

Using Kadane's Algorithm to find the brightest area in Astronomical images. Using concept of maximum contiguous subarray to find the area with highest sum and thus using opencv and finding the brightest area, applying on image and video.

License: Apache License 2.0

Jupyter Notebook 100.00%
kadane-algorithm astronomical-images subarray maximum-contigeous-sum kadane image-processing opencv

image-processing-to-find-the-brightest-area-in-astronomical-image-and-video-using-kadane-s-algorithm's Introduction

Image Processing to find the brightest area in Astronomical image and video using Kadane's Algorithm

Using Kadane's Algorithm to find the brightest area in Astronomical images.

Article: https://siddharth-m98.medium.com/dynamic-programming-with-opencv-implementing-kadanes-algorithm-to-find-brightest-area-on-9fe6e9af38d4

The maximum subarray problem is used to identify the subarray of a two dimensional array, where the sum of elements is maximized. In terms of image processing, the solution has been used to find the brightest region within an image.

We have a basic approch to this problem which is brute force and it takes O(n^2) time to execute. So we move to dynamic programming known as Kadane's Algo which solves this problem in O(n) times. This is for a 1d array.

In image processing we modify Kadanes algo to a 2d array , please refer here: https://www.geeksforgeeks.org/maximum-sum-rectangle-in-a-2d-matrix-dp-27/

We then use openCV to read image and do some preprocessing and pass it to Kadanes algo to find the region which has highest sum which is our brightest spot. I have also implemented this to work for a Video.

Main Code: Kadanes Algorithm for Bright Light spotting with Video.ipynb

Basic Image:

Basic Image

After Kadane's Algorithm:

Kadane Image

image-processing-to-find-the-brightest-area-in-astronomical-image-and-video-using-kadane-s-algorithm's People

Contributors

siddharth1698 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.