View full-text article in PMC Diagnostics (Basel). 2021 Dec 23;12(1):22. doi: 10.3390/diagnostics12010022 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 4. Computing the gradient of the OCT image. 1:function getGradientMap(img,flag,ws,smooth) 2: IM=denoise(IM,ws,smooth) 3: [gradImgX,gradImgY]=gradient(IM) 4: if flag==0 then 5: gradImgY=−gradImgY 6: end if 7: gradImgY=normalise(gradImgY,[0,1]) 8: gradImgX=abs(gradImgX) 9: gradImgX=normalise(gradImgX,[0,1]) 10: gradImg=1−(1−gradImgY)⨂gradImgX 11: gradImg=normalise(gradImg,[0,1]) 12: return[gradImg] 13:end function