R で次のようなスクリプトを作成しようとしています。
randomlist <- list(x=ran1, y=ran2) #{x,y}
contour <- Conte(c(round(randomlist$x),round(randomlist$y)),img@grey)
#if Conte function returns me an error, then get new randomlist values
#Do until it doesn't returns an error
{x,y}
乱数が画像の領域内にある場合、関数は輪郭画像の座標を返します。おそらくこれはばかげた質問であり、あまり明確ではないことはわかっていますが、Rが苦手で、エラー処理が面倒です。試してみましtryCatch()
たが、適用方法がわかりません。どうもありがとうございました!