Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,189 members, 7,818,619 topics. Date: Sunday, 05 May 2024 at 07:59 PM

PYTHON CORNER; Request For Python Algorithms - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / PYTHON CORNER; Request For Python Algorithms (1817 Views)

Data Structures And Algorithms: A Beginner's Journey. / Top 20 Websites To Learn Coding With Java, Python, SQL, Algorithms, And Git For / Free Udemy Course For Python Programmers(2 days left) (2) (3) (4)

(1) (Reply) (Go Down)

PYTHON CORNER; Request For Python Algorithms by Nobody: 6:18pm On Apr 01, 2017
Just as the topic implies, andela applicants might find this thread useful.
Re: PYTHON CORNER; Request For Python Algorithms by chigozie391(m): 8:16pm On Apr 01, 2017
emrain:
Just as the topic implies, andela applicants might find this thread useful.
am looking for a way to do ma IT at Andela self
Re: PYTHON CORNER; Request For Python Algorithms by Nobody: 6:38am On Apr 02, 2017
chigozie391:
am looking for a way to do ma IT at Andela self
It's almost impossible, but just apply.

1 Like

Re: PYTHON CORNER; Request For Python Algorithms by 4kings: 9:36am On Apr 02, 2017
following...
Re: PYTHON CORNER; Request For Python Algorithms by chigozie391(m): 9:40am On Apr 02, 2017
emrain:

It's almost impossible, but just apply.
way to kill the mood
Re: PYTHON CORNER; Request For Python Algorithms by 4kings: 3:26pm On Oct 04, 2017
I have two algorithm requests.

1) Thresholding for multiple color detection.

2) Algorithm to extract location of edges after performing edge detection on images.

(Preferably without OpenCV just PIL and maybe numpy. But hey beggars are not choosers cheesy)

Cc: Emrain , UmaryUsuf , Seun Adepeter2027 , Deicide , sonofluc1fer , JonBellion osarenomaspecial , SoftEng , adejumoadeoluwa , melodyogonna classicdude Olyboy16 pcguru danielthegeek guru01 and others.

Non-pythonitas can also post their codes so long as it's explained.
Re: PYTHON CORNER; Request For Python Algorithms by osarenomaspecial: 3:46pm On Oct 04, 2017
let me learn from this awesome thread.
Re: PYTHON CORNER; Request For Python Algorithms by HottestFire: 4:09pm On Oct 04, 2017
Re: PYTHON CORNER; Request For Python Algorithms by 4kings: 4:43pm On Oct 04, 2017
HottestFire:
@4kings got this article for you.


http://members.cbio.mines-paristech.fr/~nvaroquaux/formations/scipy-lecture-notes/advanced/image_processing/index.html
Thanks. Can't believe I wasn't aware of scipy features for images.

But what I'm looking for is how to get the positions from the pixels detected as edges. The page just provides a function for normal edge detection, i can do this with other means.
And what about colour detection?

Can you also give me any hint on how you would go about it, what if you want the system to detect different edges and draw them individually with different colours.
Re: PYTHON CORNER; Request For Python Algorithms by HottestFire: 5:38pm On Oct 04, 2017
4kings:

Thanks. Can't believe I wasn't aware of scipy features for images.

But what I'm looking for is how to get the positions from the pixels detected as edges. The page just provides a function for normal edge detection, i can do this with other means.
And what about colour detection?

Can you also give me any hint on how you would go about it, what if you want the system to detect different edges and draw them individually with different colours.





grin grin grin M.Sc thesis, grin grin grin waiting for others.
Re: PYTHON CORNER; Request For Python Algorithms by adepeter2027(m): 6:19pm On Oct 04, 2017
This one pass my power. It's been long I left python for Java.
Re: PYTHON CORNER; Request For Python Algorithms by Deicide: 6:39pm On Oct 04, 2017
Lol me too because of school
adepeter2027:
This one pass my power. It's been long I left python for Java.
Re: PYTHON CORNER; Request For Python Algorithms by 4kings: 8:12pm On Oct 04, 2017
HottestFire:





grin grin grin M.Sc thesis, grin grin grin waiting for others.
Lol... I have too many stuff on my plate, so can't focus that's why I posted it here.


Adepeter2027 do you work on image processing with Java?
Deicide why na? embarassed
Re: PYTHON CORNER; Request For Python Algorithms by adepeter2027(m): 8:17pm On Oct 04, 2017
4kings:

Lol... I have too many stuff on my plate, so can't focus that's why I posted it here.


Adepeter2027 do you work on image processing with Java?
Deicide why na? embarassed
nope
Re: PYTHON CORNER; Request For Python Algorithms by SoftEng: 9:26am On Oct 05, 2017
4kings:
I have two algorithm requests.

1) Thresholding for multiple color detection.

2) Algorithm to extract location of edges after performing edge detection on images.

(Preferably without OpenCV just PIL and maybe numpy. But hey beggars are not choosers cheesy)

Cc: Emrain , UmaryUsuf , Seun Adepeter2027 , Deicide , sonofluc1fer , JonBellion osarenomaspecial , SoftEng , adejumoadeoluwa , melodyogonna classicdude Olyboy16 pcguru danielthegeek guru01 and others.

Non-pythonitas can also post their codes so long as it's explained.


I hardly do work on image processing. However, here's what I was able to find for #2


from PIL import Image, ImageFilter
import numpy as np

im = Image.open('your-image.jpg')

# Edge detection: background should be black (i.e. pi xel value = 0). only edges should be set to a non-zero pixel value
im = im.filter(ImageFilter.FIND_EDGES)
im.save('output.jpg')

# Therefore to get the indexes of edges, retrieve the indexes of non-zero pixels.
np_im = np.array(im)
indexes = np.where(np_im != 0)
print(indexes)


Note: that you can also use ideas from the scipy link specified by HottestFire (in fact this should be preferable, as the canny edge detection algorithm in scipy *might be* better than PIL's edge detection implementation). All you need to do at the end is to get the indexes that are non-zero as shown above.
Re: PYTHON CORNER; Request For Python Algorithms by 4kings: 2:06pm On Oct 06, 2017
@SoftEng
Thank you very very much...

For the edge detection problem, I work with opencv for that but mainly use skimage; it has sobel and prewitt detection also.

I think I got an edge with the color detection problem, but I've been kinda busy. I'll post the code here when I'm done.

(1) (Reply)

Best Courier And Cargo Tracking Script With SMS Notification / C++ Simulation: Simulating An M/M/1 System / How Much Does It Cost To Design An Ecommerce App In Nigeria

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 20
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.