I have a pathology image of size 1024 x 1360. I have probability values of some areas and coordinate points. How can I write a code for heatmap generation using the coordinate points and probability values over an image. The details of the probability values (.csv) file format are given below. Any help will be highly appreciated.
Edit:
CSV file format Download .csv file
Content of CSV file:
(x,y) (x, y+y1) (x+x1, y) (x+x1, y+y1) Probability value
(0,0) (0, 5) (10, 0) (10, 5) 0.5
(50,45) (50, 65) (55, 45) (55, 65) 0.9
(100, 150) (100, 200) (120, 150) (120, 200) 0.3
(1000, 1005) (1000, 1010) (1005, 1005) (1005, 1010) 1
Sample imageover which Heatmap should be generated [![Download the image here][2]][2]
Expected Heatmap type [![The generated Heatmap over images should be like this][3]][3]
Generated Results after applying @Paradox's code [![generated output][4]][4]
Additional clarification:
"p" is the probability value of having cancer or not in that particular area. I have extracted all the patches of size 256 x 256 from whole slide images and computed "probability values" of each patch. Now based on that value I'm planning to generate the heatmap. But by using your code I'm getting output like above. Even the color bar is missing. Please help.