If we would use a sorted stack (function of Manhattan Distance from current pixel to the seed one) we might find it useful for maintaining the "shape factor" of current filled zone which is meant for using less working memory data. Also, there could be some "memory data write protection" for the same purpose. These as some start point for further algo features to be added.
If the memory data used for the sorted stack kinda needs circulary overwrite, then we might use , first, some data sampling, probabily the shape factor will work pretty well in this case , either
I thank you a lot, the second recommended method works well in my android app. Compared to other method, this technique has no nested loop and less overload. Bravos !
@@insidecode you can improve the algorithm by drawing not by point by point, but entire line - until it hits borders and then go to the next line what is near. Maybe you will make do tutorial about that.
Hmm, recently i have implemented this algorithm to find the differences between two pictures, and visualize them, I didn't even know, that it has "Flood fill" name :)
Just what I needed. Thanks. The only gripe I have is with the variable names: @6:00 n, m, i, j are not descriptive at all. I would rename "m" to "iWide", "n" to "iHigh", "i" to "iRow", "j" to "iCol"/"iColumn". I know the variable names are better @7:30, but one will run out of single letter names pretty fast. In my opinion it's better to type a little more and be clearer than to save a few keyboard strokes. I like to use Hungarian notation with a single letter for the type (in Python: bVar for boolean, iVar for integer, fVar for float, lVar for list, tVar for tuple, ...), but I guess it's out of fashion for some reason.
I think that n, m, i and j are the standard variable names when dealing with matrices, where n and m are the dimensions (rows and columns respectively) and i and j the coordinates of the actual cell
You're welcome! Yes magic wand tool uses flood fill, it keeps expanding until it finds pixels with whom the difference is higher than the tolerance. I'll try to make a video on it
Hey, yes you have improved a lot from before. Now I can pinpoint the only issue you have cuz you are overall so much more clear in your speech now. It's the way you pronounce words with the alphabet 'O'. Okay lemme try, see when we pronounce a word that has an 'O' in it, like the word - 'word' itself => our lower lip only moves (kinda) but when you are speaking this word, you put too much pressure where the alphabet 'O' is. (Try not to change your intonation too much and maybe just here and there but just a little so that it doesn't sound robotic. I had issues in speaking in monotone and had to learn it the hard way lol) This is just an example for this word. It's not a rule that every word with an 'O' will only use the lower lip. But it makes it a lot clear when we don't put too much pressure in any specific alphabet. Different languages pronounce the English language in a different way due to which we have so many accents. But a common thing in all the accents that are easy to understand => they don't apply pressure to specific alphabets. Once again, just trying to help if all this explanation makes sense. Your knowledge and way of teaching is excellent. All the best mate! Edit - Oh and this one was the best video by far. I had doubts in this one too but it's all clear now. Thanks!
Hello, Is there any way someone could send me a copy of this when the code is working with pygame (BFS version), as I have trouble implementing the source code linked under the video.? If yes, thank you!
Discover the new graph theory algorithms course: inscod.com/graphalgo
🔴
/ \
🔵-🔴
| |
🔴-🔵
Man you deserve more recognition. I went from hopless to implementing flood fill into my command like paint project in 9 minutes. Thanks :)
I'm a visual learner and your videos are SO helpful! I appreciate it! Thank you :-)
You're welcome!
yup me too....videos are very self-explanatory compared to long scrolling websites
Thank you! This was exactly the 8 minute video I needed to learn about flood fill algorithms for today's job.
Thanks a lot. We need more non-indian math/coding youtubers.
1 min in the video and subscribed already!! Good stuff man
If we would use a sorted stack (function of Manhattan Distance from current pixel to the seed one) we might find it useful for maintaining the "shape factor" of current filled zone which is meant for using less working memory data. Also, there could be some "memory data write protection" for the same purpose. These as some start point for further algo features to be added.
If the memory data used for the sorted stack kinda needs circulary overwrite, then we might use , first, some data sampling, probabily the shape factor will work pretty well in this case , either
Interesting remarks
@@insidecode Thank You very much! You are very kind.
This is a GOD SEND to me to prepare for my exam. Thank you!
Shouldn't you start with right cell search to optimize memory access though ?
DFS looks like it's a good algorithm for a pen plotter fill algorithm like the way it snakes across the image to fill it is just wonderful!
I thank you a lot, the second recommended method works well in my android app. Compared to other method, this technique has no nested loop and less overload. Bravos !
You're welcome!
@@insidecode you can improve the algorithm by drawing not by point by point, but entire line - until it hits borders and then go to the next line what is near. Maybe you will make do tutorial about that.
Wonderful explanation, flood fill was blurred to me until now. Thanks
You're welcome!
Fantastic explanation, well done
Sir thank you so much for making the algorithms easy and visuable for us.
You're welcome!
Awesome ❤ amazing visualisation loved it and moreover understand the dreaded BFS/DFS
THANKS A TON
How did you make videos like this? This is very informative and is great for visualising algorithms while also explaining the coding for it.
Best explanation of the problem thanks sir for clear my doubts 🤩🤩
You're welcome!
Thanks a lot! I was wondering why my floodfill wasn't working like it should. It turned out that it was because the logic was DFS no BFS.
Hmm, recently i have implemented this algorithm to find the differences between two pictures, and visualize them, I didn't even know, that it has "Flood fill" name :)
Space complexity for BFS is O(n + m)
Dont use recursion, instead use a Stack or a Queue with a loop.
With recursion you let the program use its own stack and it has a small limit.
Not that small tbh. Recursion is fine for reasonably sized canvas
the indentation on your github page is broken. Good helpful tutorial!
Best explanation ever!
this was really great!!!!
Thanks!
Cool way of learning computer graphics I was finding it boring to read from other channels
Thanks you man that was really well shown
Just what I needed. Thanks.
The only gripe I have is with the variable names:
@6:00 n, m, i, j are not descriptive at all. I would rename "m" to "iWide", "n" to "iHigh", "i" to "iRow", "j" to "iCol"/"iColumn". I know the variable names are better @7:30, but one will run out of single letter names pretty fast. In my opinion it's better to type a little more and be clearer than to save a few keyboard strokes.
I like to use Hungarian notation with a single letter for the type (in Python: bVar for boolean, iVar for integer, fVar for float, lVar for list, tVar for tuple, ...), but I guess it's out of fashion for some reason.
I think that n, m, i and j are the standard variable names when dealing with matrices, where n and m are the dimensions (rows and columns respectively) and i and j the coordinates of the actual cell
That's awesome. Thank you!!
Besides, is the magic wand tool method the same as this? can you explain later?
You're welcome! Yes magic wand tool uses flood fill, it keeps expanding until it finds pixels with whom the difference is higher than the tolerance. I'll try to make a video on it
@@insidecode Yes thank you, i'll wait :D
Just what I needed, thank you !
It’s so wonderful. Thank your uploading!
You're welcome!
Hey, yes you have improved a lot from before. Now I can pinpoint the only issue you have cuz you are overall so much more clear in your speech now. It's the way you pronounce words with the alphabet 'O'. Okay lemme try, see when we pronounce a word that has an 'O' in it, like the word - 'word' itself => our lower lip only moves (kinda) but when you are speaking this word, you put too much pressure where the alphabet 'O' is. (Try not to change your intonation too much and maybe just here and there but just a little so that it doesn't sound robotic. I had issues in speaking in monotone and had to learn it the hard way lol)
This is just an example for this word. It's not a rule that every word with an 'O' will only use the lower lip. But it makes it a lot clear when we don't put too much pressure in any specific alphabet. Different languages pronounce the English language in a different way due to which we have so many accents. But a common thing in all the accents that are easy to understand => they don't apply pressure to specific alphabets.
Once again, just trying to help if all this explanation makes sense. Your knowledge and way of teaching is excellent. All the best mate!
Edit - Oh and this one was the best video by far. I had doubts in this one too but it's all clear now. Thanks!
Thanks for this detailed feedback! Sure it's gonna help me improve
Wonderful,great explaination man
Thanks a lot!
Wow, calculating islands or biomes is exactly what I was looking for. It will come out soon? or already did
already did!
Very well explained! Thanks!
You're welcome!
What an amazing video
Many thanks, pal !
Hello, Is there any way someone could send me a copy of this when the code is working with pygame (BFS version), as I have trouble implementing the source code linked under the video.? If yes, thank you!
Thank you!
Very nice code
your videos are so helpful :)
Thanks!
I'm getting recursive limits exceed in python while implementing
How much is the size of your grid?
@@insidecode my circle radius is 50 but for smaller radius circle it works
Is there any way to run it on large radius size without getting error
@@gamermoneyfree8193 you can modify the recursion limit with sys.setrecursionlimit, or you can use BFS instead of DFS to avoid recursion
@@insidecode ty for response
@@gamermoneyfree8193 you're welcomee
very nice video
Made the 200'th like 😁
Thankyou so much..... !
You're welcome!
1000th like. Great video.
🟥🟩
🤍