After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754148 - OpenCV port remaining elements to C++ and new API
OpenCV port remaining elements to C++ and new API
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.5.90
Other All
: Normal normal
: 1.7.1
Assigned To: Vanessa Chipirrás Navalón
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-26 23:05 UTC by Vanessa Chipirrás Navalón
Modified: 2015-10-02 18:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove unused and useless functions to achieve the objective. (1.29 KB, patch)
2015-08-27 21:13 UTC, Vanessa Chipirrás Navalón
none Details | Review
Remove unused and useless functions (1.26 KB, patch)
2015-08-27 22:21 UTC, Vanessa Chipirrás Navalón
committed Details | Review
Rename gstedgedetect.c to gstedgedetect.cpp for consistency. (24.46 KB, patch)
2015-08-28 12:54 UTC, Vanessa Chipirrás Navalón
committed Details | Review
Change gstretinex.c to C++. (27.41 KB, patch)
2015-08-29 18:01 UTC, Vanessa Chipirrás Navalón
committed Details | Review
Rename gstcvsmooth.c to gstcvsmooth.cpp for consistency. (24.66 KB, patch)
2015-08-30 21:20 UTC, Vanessa Chipirrás Navalón
none Details | Review
need to migrate to new version of OpenCV 2.4.11. (11.72 KB, patch)
2015-08-30 21:22 UTC, Vanessa Chipirrás Navalón
none Details | Review
Rename gstskindetect.c to gstskindetect.cpp for consistency. (33.28 KB, patch)
2015-08-31 15:39 UTC, Vanessa Chipirrás Navalón
none Details | Review
Change to C++ (24.67 KB, patch)
2015-08-31 22:18 UTC, Vanessa Chipirrás Navalón
committed Details | Review
opencvutils: Add extern C, for the opencv elements work. (1.04 KB, patch)
2015-08-31 22:44 UTC, Vanessa Chipirrás Navalón
none Details | Review
cvsmooth: need to migrate to new version of OpenCV 2.4.11. (11.95 KB, patch)
2015-09-01 13:51 UTC, Vanessa Chipirrás Navalón
rejected Details | Review
skindetect: Change gstskindetect to C++. (33.25 KB, patch)
2015-09-01 14:36 UTC, Vanessa Chipirrás Navalón
committed Details | Review
opencvutils: add extern C, for the opencv elements work. (1.02 KB, patch)
2015-09-01 14:40 UTC, Vanessa Chipirrás Navalón
committed Details | Review
cvdilate: Change gstcvdilate to C++. (10.36 KB, patch)
2015-09-07 13:27 UTC, Vanessa Chipirrás Navalón
committed Details | Review

Description Vanessa Chipirrás Navalón 2015-08-26 23:05:25 UTC
The remaining elements of OpenCV should be ported to C ++ language, because three elements, facedetect, handdetect and faceblur, were modified with the new API 2.4.11 of Opencv to work in old and new versions.

Handdetect -> https://bugzilla.gnome.org/show_bug.cgi?id=752528
Facedetect -> https://bugzilla.gnome.org/show_bug.cgi?id=748377
Faceblur -> https://bugzilla.gnome.org/show_bug.cgi?id=753994
Comment 1 Vanessa Chipirrás Navalón 2015-08-27 21:13:07 UTC
Created attachment 310135 [details] [review]
Remove unused and useless functions to achieve  the objective.

The cvSmooth cvNot functions and do not have the correct input parameters.
Furthermore, cvSmooth function is not necessary for edge detection,
because the Canny function makes the step of smoothing the image.
And cvNot function is useless because there aren't changes if this
function is eliminated.

https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 2 Vanessa Chipirrás Navalón 2015-08-27 22:21:32 UTC
Created attachment 310141 [details] [review]
Remove unused and useless functions

The cvSmooth cvNot functions and do not have the correct input parameters.
Furthermore, cvSmooth function is not necessary for edge detection,
because the Canny function makes the step of smoothing the image.
And cvNot function is useless because there aren't changes if this
function is eliminated.

https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 3 Vanessa Chipirrás Navalón 2015-08-28 12:54:29 UTC
Created attachment 310181 [details] [review]
Rename gstedgedetect.c to gstedgedetect.cpp for consistency.

Change the file extension to cpp and add it into Makefile for consistency
with other elements of opencv.

https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 4 Luis de Bethencourt 2015-08-28 13:21:49 UTC
Review of attachment 310141 [details] [review]:

Tested and patch makes sense.
Looks good.
Comment 5 Luis de Bethencourt 2015-08-28 13:27:40 UTC
Review of attachment 310181 [details] [review]:

I don't think this is about consistency but about using the C++ API of OpenCV.

Patch is good. Just change commit message to say this switches the element to C++ since that is what OpenCV supports only now.

Tested.
Comment 6 Luis de Bethencourt 2015-08-28 13:28:06 UTC
Review of attachment 310181 [details] [review]:

Sorry. Meant need-work.
Comment 7 Luis de Bethencourt 2015-08-28 13:29:27 UTC
Review of attachment 310181 [details] [review]:

After second thought. Commit message is fine like this.
Comment 8 Luis de Bethencourt 2015-08-28 14:45:31 UTC
Review of attachment 310141 [details] [review]:

Merged.
Comment 9 Vanessa Chipirrás Navalón 2015-08-29 18:01:22 UTC
Created attachment 310274 [details] [review]
Change gstretinex.c to C++.

Change the gstretinex.c file to cpp and add it into Makefile.
It is necessary to migrate the retinex element to C++,
because new Opencv API leaves obsolete functions like cvSmooth.
This element uses this function.

You can see in this link:
http://docs.opencv.org/modules/imgproc/doc/filtering.html?
highlight=cvsmooth#void cvSmooth(const CvArr* src, CvArr* dst,
int smoothtype, int size1, int size2, double sigma1, double sigma2)

https://bugzilla.gnome.org/show_bug.cgi?id=754148


Ready for review.
Comment 10 Vanessa Chipirrás Navalón 2015-08-30 21:20:36 UTC
Created attachment 310321 [details] [review]
Rename gstcvsmooth.c to gstcvsmooth.cpp for  consistency.

Change the file extension to cpp and add it into Makefile for consistency
with other elements of opencv.

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Ready for review
Comment 11 Vanessa Chipirrás Navalón 2015-08-30 21:22:26 UTC
Created attachment 310322 [details] [review]
need to migrate to new version of OpenCV 2.4.11.

It is necessary to migrate the gstcvsmooth element to C++,
because new Opencv API leaves obsolete functions like cvSmooth.
This element uses this function.

You can see in this link:
http://docs.opencv.org/modules/imgproc/doc/filtering.html?
highlight=cvsmooth#void cvSmooth(const CvArr* src, CvArr* dst,
int smoothtype, int size1, int size2, double sigma1, double sigma2)

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Ready for review.
Comment 12 Vanessa Chipirrás Navalón 2015-08-31 15:39:55 UTC
Created attachment 310372 [details] [review]
Rename gstskindetect.c to gstskindetect.cpp for consistency.

Change the file extension to cpp and add it into Makefile for consistency
with other elements of opencv and because Opencv not support C language in
new API 2.4.11.

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Ready for review.
Comment 13 Luis de Bethencourt 2015-08-31 18:41:46 UTC
Review of attachment 310274 [details] [review]:

Looks good.
Comment 14 Luis de Bethencourt 2015-08-31 18:44:25 UTC
Review of attachment 310321 [details] [review]:

Can you change the subject of this patch to "cvsmooth: change to C++"?
Comment 15 Luis de Bethencourt 2015-08-31 18:47:54 UTC
Review of attachment 310322 [details] [review]:

Can you explain why you are adding a PROP_PIXEL_DIAMETER? Is this necessary to migrate to the new version of OpenCV?
Comment 16 Vanessa Chipirrás Navalón 2015-08-31 22:13:19 UTC
One of the functions added due to cvSmooth becomes obsolete, has one input parameter (PROP_PIXEL_DIAMETER) that did not exist in cvSmooth. For this I think that enters the reason for migrating to C ++.
Comment 17 Vanessa Chipirrás Navalón 2015-08-31 22:18:20 UTC
Created attachment 310383 [details] [review]
Change to C++

Change the file extension to cpp and add it into Makefile for consistency
with other elements of opencv and because Opencv not support C language in
new API 2.4.11.

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Only I changed the summary and description of this patch.

Ready for review.
Comment 18 Vanessa Chipirrás Navalón 2015-08-31 22:44:27 UTC
Created attachment 310386 [details] [review]
opencvutils: Add extern C, for the opencv elements work.

G_BEGIN_DECLS and G_END_DECLS added within gstopencvutils.h
for to allow the header is linked in C++.

https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 19 Luis de Bethencourt 2015-09-01 12:26:14 UTC
Review of attachment 310322 [details] [review]:

Then you should explain this in the commit message. (New property).

In line 190:
g_object_class_install_property (gobject_class, PROP_HEIGHT,

You have PROP_HEIGHT twice, I think you meant PROP_PIXEL_DIAMETER.
Comment 20 Luis de Bethencourt 2015-09-01 12:29:52 UTC
Review of attachment 310372 [details] [review]:

Please change the commit message. Renaming the file is the action, "Change skindetect to C++" is the purpose.

Actions are explicit when you look at a commit diff, you want to read the purpose in the commit message to understand why.
Comment 21 Luis de Bethencourt 2015-09-01 12:31:29 UTC
Review of attachment 310322 [details] [review]:

Wait. Should the recent patch that you sent make this one obsolete? There is a checkmark you have to tick, declaring it made a previous patch obsolete.
Comment 22 Luis de Bethencourt 2015-09-01 12:34:38 UTC
Review of attachment 310386 [details] [review]:

Patch looks good.

Commit message is broken though:
"Adding G_BEGIN_DECLS and G_END_DECLS to gstopencvutils.h to allow C-style linking".
Comment 23 Vanessa Chipirrás Navalón 2015-09-01 12:45:00 UTC
(In reply to Luis de Bethencourt from comment #19)
> Review of attachment 310322 [details] [review] [review]:
> 
> Then you should explain this in the commit message. (New property).
> 
> In line 190:
> g_object_class_install_property (gobject_class, PROP_HEIGHT,
> 
> You have PROP_HEIGHT twice, I think you meant PROP_PIXEL_DIAMETER.

Yes, is PROP_PIXEL_DIAMETER, sorry, I change this now.
Comment 24 Vanessa Chipirrás Navalón 2015-09-01 13:51:58 UTC
Created attachment 310422 [details] [review]
cvsmooth: need to migrate to new version of OpenCV 2.4.11.

It is necessary to migrate the gstcvsmooth element to C++,
because new Opencv API leaves obsolete functions like cvSmooth.
This element uses this function. Therefore, it was replaced by
the GaussianBlur, blur, medianBlur and bilateralFilter functions.

bilateralFilter function has an input parameter, is diameter of each
pixel. For this reason a new property is added, PROP_PIXEL_DIAMETER.

You can see in this link:
http://docs.opencv.org/modules/imgproc/doc/filtering.html?
highlight=cvsmooth#void cvSmooth(const CvArr* src, CvArr* dst,
int smoothtype, int size1, int size2, double sigma1, double sigma2)

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Only I changed the commit message and I fixed line 190 where I made a mistake.
Comment 25 Luis de Bethencourt 2015-09-01 14:18:38 UTC
Review of attachment 310383 [details] [review]:

Looks good.
Comment 26 Luis de Bethencourt 2015-09-01 14:19:39 UTC
Review of attachment 310422 [details] [review]:

Thanks for fixing this.
Comment 27 Vanessa Chipirrás Navalón 2015-09-01 14:36:52 UTC
Created attachment 310427 [details] [review]
skindetect: Change gstskindetect to C++.

Change the file extension to cpp and add it into Makefile for consistency
with other elements of opencv and because Opencv not support C language in
new API 2.4.11.

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Only I changed commit message.
Comment 28 Vanessa Chipirrás Navalón 2015-09-01 14:40:53 UTC
Created attachment 310428 [details] [review]
opencvutils: add extern C, for the opencv elements work.

Adding G_BEGIN_DECLS and G_END_DECLS to gstopencvutils.h
to allow C-style linking.

https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 29 Vanessa Chipirrás Navalón 2015-09-01 14:44:19 UTC
Only I changed commit message of previous patch.
Comment 30 Luis de Bethencourt 2015-09-01 15:02:19 UTC
Review of attachment 310427 [details] [review]:

Looks good.
Comment 31 Luis de Bethencourt 2015-09-01 15:02:44 UTC
Review of attachment 310428 [details] [review]:

Thanks Vanessa.
Comment 32 Vanessa Chipirrás Navalón 2015-09-07 13:27:02 UTC
Created attachment 310815 [details] [review]
cvdilate: Change gstcvdilate to C++.

Change the gstcvdilate.c file extension to cpp and add it into Makefile for
consistency with other elements of opencv and because Opencv not support C
language in new API 2.4.11.

https://bugzilla.gnome.org/show_bug.cgi?id=754148

Ready for review.
Comment 33 Luis de Bethencourt 2015-09-16 14:34:39 UTC
Review of attachment 310815 [details] [review]:

Looks good.

Thanks Vanessa :)
Comment 34 Luis de Bethencourt 2015-10-02 16:46:51 UTC
Review of attachment 310181 [details] [review]:

commit 1e14ceedb38e063e4c5558e8aa28681a57049c13
Author: Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
Date:   Fri Aug 28 13:42:29 2015 +0200

    edgedetect: Rename gstedgedetect.c to gstedgedetect.cpp for consistency.

    Change the file extension to cpp and add it into Makefile for consistency
    with other elements of opencv.

    https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 35 Luis de Bethencourt 2015-10-02 17:08:52 UTC
Review of attachment 310274 [details] [review]:

commit 936665dfd65f1a58aa35d137b19b2d3eec4f4784
Author: Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
Date:   Fri Oct 2 17:48:47 2015 +0100

    retinex: Change retinex to C++

    Change the gstretinex.c file to cpp and add it into Makefile.
    It is necessary to migrate the retinex element to C++,
    because new Opencv API leaves obsolete functions like cvSmooth.
    This element uses this function.

    You can see in this link:
    http://docs.opencv.org/modules/imgproc/doc/filtering.html?
    highlight=cvsmooth#void cvSmooth(const CvArr* src, CvArr* dst,
    int smoothtype, int size1, int size2, double sigma1, double sigma2)

    https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 36 Luis de Bethencourt 2015-10-02 17:43:37 UTC
Review of attachment 310383 [details] [review]:

commit ae55a537e6b4244be4bec086bb512bdb6cf8ac0a
Author: Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
Date:   Fri Oct 2 18:10:32 2015 +0100

    cvsmooth: port to C++

    Change the file extension to cpp and add it into Makefile for consistency
    with other elements of opencv and because Opencv not support C language in
    new API 2.4.11.

    https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 37 Luis de Bethencourt 2015-10-02 17:46:00 UTC
Review of attachment 310422 [details] [review]:

Same as above commit which is already merged.
Comment 38 Luis de Bethencourt 2015-10-02 17:47:45 UTC
Review of attachment 310428 [details] [review]:

commit 1c9763c0eb3e4f89bc6871582aca7212c44d3c64
Author: Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
Date:   Mon Aug 31 17:43:26 2015 +0200

    opencvutils: add extern C, for the opencv elements work.

    Adding G_BEGIN_DECLS and G_END_DECLS to gstopencvutils.h
    to allow C-style linking.

    https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 39 Luis de Bethencourt 2015-10-02 18:00:57 UTC
Review of attachment 310427 [details] [review]:

commit 7f9aef31cb380fead3f90b645b5175fd59521701
Author: Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
Date:   Fri Oct 2 18:50:45 2015 +0100

    skindetect: Change gstskindetect to C++

    Change the file extension to cpp and add it into Makefile for consistency
    with other elements of opencv and because Opencv not support C language in
    new API 2.4.11.

    https://bugzilla.gnome.org/show_bug.cgi?id=754148
Comment 40 Luis de Bethencourt 2015-10-02 18:08:35 UTC
Review of attachment 310815 [details] [review]:

commit f8e11fe656a360004f9874befd1d217cda407659
Author: Vanessa Chipirrás Navalón <vchipirras6@gmail.com>
Date:   Fri Oct 2 19:02:26 2015 +0100

    cvdilate: Change gstcvdilate to C++

    Change the gstcvdilate.c file extension to cpp and add it into Makefile for
    consistency with other elements of opencv and because Opencv not support C
    language in new API 2.4.11.

    https://bugzilla.gnome.org/show_bug.cgi?id=754148