void MorphologyOperation::findEdgeChains(Mat img) { int i,j, e = 25; int whites = 0,black = 0, edges = 0; Mat dst = img.clone(); for(i=e; i<img.rows-e; i++) { for(j=e; j<img.cols-e; j++) { if(img.at<uchar>(i, j) == 255) { if(pixelArea(img, i, j) > 5 && pixelArea(img, i, j) < 17) //17 for r = 4 { dst.at<uchar>(i, j) = 127; } } } } uniteEndPoinds(dst); // imshow("q", dst); }
void WidgetComponent::layout(const Window& owner) const { try { Rectf pixelArea(d_area.getPixelRect(owner)); URect window_area(cegui_absdim(pixelArea.left()), cegui_absdim(pixelArea.top()), cegui_absdim(pixelArea.right()), cegui_absdim(pixelArea.bottom())); Window* wnd = owner.getChild(d_name); wnd->setArea(window_area); wnd->notifyScreenAreaChanged(); } catch (UnknownObjectException&) {} }
void WidgetComponent::layout(const Window& owner) const { try { Rect pixelArea(d_area.getPixelRect(owner)); URect window_area(cegui_absdim(pixelArea.d_left), cegui_absdim(pixelArea.d_top), cegui_absdim(pixelArea.d_right), cegui_absdim(pixelArea.d_bottom)); Window* wnd = WindowManager::getSingleton().getWindow(owner.getName() + d_nameSuffix); wnd->setArea(window_area); wnd->notifyScreenAreaChanged(); } catch (UnknownObjectException&) {} }