Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Phys 129L: EXTRA CREDIT
Instructions: name the file that should be use for the program
ext cr1 permnumber.py
Find the “Stars”. In the image provided “Christmas.jpg”, there are
bright sources of light that need to be identified. Make a program that counts
the bright lights.
1. First, load the image. Check that you have loaded it correctly (e.g.
show it on screen).
2. Do a filter for brightness that only selects the “bright” pixels. Setting
up the threshold values is up to you. It is convenient to filter on red,
green ,blue and see which one is better first. Show the processed image
on screen.
3. Clustering: make an algorithm that clusters pixels into stars. That is,
make sure that if two nearest neighbors in the picture are hot, that
they belong to the same star.
4. Count how many stars are in the field of stars.
5. Extra, extra credit: make a movie where the stars are blinking on
top of the picture.