How to convert newton basin into a binary image.
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Abiti Sendek
le 3 Jan 2017
Commenté : Walter Roberson
le 4 Jan 2017
I've recently made a newton basin using this program and slight variations of it. How do i take it a step further and convert the color map into a binary image, so that I can run box counting programs on them.
0 commentaires
Réponse acceptée
Walter Roberson
le 3 Jan 2017
near_z1 = c(:,:,2) > 0;
near_z2 = c(:,:,1) > 0 & ~near_z1;
near_z3 = c(:,:,3) > 0;
Note: in theory these can overlap -- after all, your roots might be very close to each other. However, because you set the red plane for both z1 and z2, in order to not have the z2 map include the z1 values unnecessarily, you have to exclude the places z1 was found. That is a problem because your code does not give any way to figure out the places where z1 and z2 should both be set.
If your code for z1 did not set the red plane as well as the green plane, it would be easy.
2 commentaires
Walter Roberson
le 4 Jan 2017
imshow(near_z1)
You have 3 black and white images available, one for each of the z variables. The z1 and z2 will never overlap because of the way z2 had to be constructed but the z1 and z2 can overlap and the z2 and z3 can overlap. (The overlaps would happen if the input roots are close together.)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Fractals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!