简体   繁体   中英

Access RotatedRect center value?

i need to convert following C++ code to opencv based android and access center of the "rect" 'result" is mat object. i'm having error here.

ArrayList<RotatedRect> rects = new  ArrayList<RotatedRect>();
for(int i=0; i< rects.size(); i++){
  core.circle(result, rects[i].center, 3, Scalar(0,255,0), -1);
}

它是一个ArrayList,而不是简单的数组,因此请使用:

rects.get(i).center; // not rects[i]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM