Example 2 in "Image Processing and Computer Vision" - Code does not build in Xcode
After copying the code for example 2 from "Image Processing and Computer Vision" (Preliminaries to Image Processing) into Xcode and attempting to build the application, the build fails due to the following error:
In ofApp.cpp of example 2:
[line 30] unsigned char* pixelData = myVideoGrabber.getPixels();
Introduces the error:
“No viable conversion from ‘ofPixels’ (aka ‘ofPixels_
hi @alexanderogle ,
that line should be
unsigned char* pixelData = myVideoGrabber.getPixels().getData();
can you please test it in order to make the fix? Please inform if any other issue.
best!
Hey @roymacdonald,
That was definitely the fix. I was able to build and run the program after that.
Nice work!
cc @golanlevin -- it's a small fix for getPixels (which now returns ofPixels() vs before when it returned a pointer to the data)... maybe you can take a look at your chapter and see if there are any updates you need to make to the code accordingly ?
Hi, the issue with getPixels is still there, unfortunately it's a bit confusing because is hard to find a fix on google.
@alexanderogle I guess you should open back this issue.
I've re-opened the issue, I think it's not just as simple as adding getPixels().getData() everywhere but maybe also re-writing the chapter about low level vs high level access to explain the ofPixels object.
I somehow missed this issue in 2016. I'd be happy to give it some attention later this week. g
On Sun, Jul 28, 2019 at 4:16 PM ofZach [email protected] wrote:
I've re-opened the issue, I think it's not just as simple as adding getPixels().getData() everywhere but maybe also re-writing the chapter about low level vs high level access to explain the ofPixels object.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openframeworks/ofBook/issues/238?email_source=notifications&email_token=AACG2BPSMKPVMNZTUJII5M3QBX5AVA5CNFSM4CUBKW62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27FXKA#issuecomment-515791784, or mute the thread https://github.com/notifications/unsubscribe-auth/AACG2BN3VSSNEZMYRLJPBF3QBX5AVANCNFSM4CUBKW6Q .
Hi there, I wrote this some time ago as some sort of extension to Golan's ofBook chapter. I'd be glad if this is used as well as helping to improve this chapter.