# \donttest{
############################################################################
#Obtendo o numero de ovos em uma folha
############################################################################
#Carregar imagem de exemplo
im=read_image(example_image(2),plot=TRUE)
## Fazendo a segmentacao na imagem
m=segmentation_steps(img=im,
indexes=c("b","b"),
threshold=c(0.39,0.7),
selectHigher=c(FALSE,TRUE),
fillHull=c(TRUE,TRUE),
fillBack=c(FALSE,FALSE),
thresholdFinish = 0.5,
selectHigherFinish = TRUE,
fillHullFinish = FALSE,
plot=TRUE)
measure_image(m,splitConnected = FALSE)
#Ver a mascara sobre os ovos na foto
im3=mask_pixels(im,m==1,plot=TRUE)
# }
Run the code above in your browser using DataLab