Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 555782 | Differences between
and this patch

Collapse All | Expand All

(-)./frei0r-plugins-1.4/src/filter/facedetect/facedetect.c.opencv3 (-2 / +2 lines)
Lines 211-218 CvSeq* detect_and_draw( IplImage* img, C Link Here
211
211
212
  double scale = 1.3;
212
  double scale = 1.3;
213
  IplImage* gray = cvCreateImage( cvSize(img->width,img->height), 8, 1 );
213
  IplImage* gray = cvCreateImage( cvSize(img->width,img->height), 8, 1 );
214
  IplImage* small_img = cvCreateImage( cvSize( cvRound (img->width/scale),
214
  IplImage* small_img = cvCreateImage( cvSize( cvRound ((double)img->width/scale),
215
                                               cvRound (img->height/scale)),
215
                                               cvRound ((double)img->height/scale)),
216
                                       8, 1 );
216
                                       8, 1 );
217
  int i;
217
  int i;
218
218
(-)./frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp.opencv3 (-8 / +8 lines)
Lines 259-269 private: Link Here
259
    {
259
    {
260
        double scale = this->scale == 0? 1.0 : this->scale;
260
        double scale = this->scale == 0? 1.0 : this->scale;
261
        CvScalar colors[5] = {
261
        CvScalar colors[5] = {
262
            {{cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)}},
262
            CvScalar(cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)),
263
            {{cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)}},
263
            CvScalar(cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)),
264
            {{cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)}},
264
            CvScalar(cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)),
265
            {{cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)}},
265
            CvScalar(cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)),
266
            {{cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)}},
266
            CvScalar(cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)),
267
        };
267
        };
268
        
268
        
269
        for (int i = 0; i < (objects ? objects->total : 0); i++)
269
        for (int i = 0; i < (objects ? objects->total : 0); i++)
Lines 287-300 private: Link Here
287
                }
287
                }
288
            case 1:
288
            case 1:
289
                {
289
                {
290
                    CvBox2D box = {{center.x, center.y}, {r->width / scale, (r->height / scale) * 1.2}, 90};
290
                    CvBox2D box = CvBox2D(CvPoint2D32f(center.x, center.y), CvSize2D32f(r->width / scale, (r->height / scale) * 1.2), 90);
291
                    cvEllipseBox(image, box, colors[i % 5], thickness, linetype);
291
                    cvEllipseBox(image, box, colors[i % 5], thickness, linetype);
292
                    break;
292
                    break;
293
                }
293
                }
294
            case 2:
294
            case 2:
295
                {
295
                {
296
                    CvPoint pt1 = {r->x / scale, r->y / scale};
296
                    CvPoint pt1 = CvPoint(r->x / scale, r->y / scale);
297
                    CvPoint pt2 = {(r->x + r->width) / scale, (r->y + r->height) / scale};
297
                    CvPoint pt2 = CvPoint((r->x + r->width) / scale, (r->y + r->height) / scale);
298
                    cvRectangle(image, pt1, pt2, colors[i % 5], thickness, linetype);
298
                    cvRectangle(image, pt1, pt2, colors[i % 5], thickness, linetype);
299
                    break;
299
                    break;
300
                }
300
                }

Return to bug 555782