Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Otsu Clustering #27

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Otsu Clustering #27

wants to merge 30 commits into from

Conversation

khilanravani
Copy link

An initial version of Otsu Clustering algorithm. A few changes yet to be made before producing sample outputs.

khilanravani and others added 30 commits May 28, 2018 15:49
We first extract some information from the image - width, height etc., convert
to luma and compute gradients. Then, for each pixel (x,y), we compute rho = xcos(theta) + ysin(theta).
After a few more transformations and finding the bins with highest values, we generate the
resulting image.
Preliminary Hough transform implementation
It is used to improve contrast in images and works by performing
enhancement on small 'contextual' regions or neighborhood of each
pixel in the given image.
Fix the horizontal kernel of Sobel filter.
* Mean filter version 1
@@ -46,6 +46,8 @@ Library
, vector >= 0.10
, array
, random
, random-fu
, normaldistribution
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to use 3 different packages that do random numbers?

import Data.Vector.Unboxed as V
import Data.List as L

-- the tail is safe because scanl alawys returns a nonempty list
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That statement is incorrect. dropWhile could make that list empty, so it is important to know that there is at least one element in the list with wF == 0. For example, this function will produce an error if hist is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants