Text this: Alternating group explicit method for edge detection on brain and breast tumour inages