my code work well but i think it too too too long and take long time 3 minutes can any one help me to make it small and powerful and faster
You indicate you are searching for intensity points, but you have not defined the algorithm and you have not defined what you want the output to be. The table in the .docx file does not help as you did not give any interpretation of it.
Your existing code has the appearance of a rats nest. There is no point in us analyzing how it works or what it is intended to do, when it would be much easier for you to describe it and document it (including comments.)