Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Bus error when converting colors

I get a bus error from this section of the code. Perhaps there is nothing at the pointer address.

void VisionPipeline::hslThreshold(cv::Mat &input, double hue[], double sat[], double lum[], cv::Mat &out) { cv::cvtColor(input, out, cv::COLOR_BGR2HLS); cv::inRange(out, cv::Scalar(hue[0], lum[0], sat[0]), cv::Scalar(hue[1], lum[1], sat[1]), out); }

It is being run by

hslThreshold(hslThresholdInput, hslThresholdHue, hslThresholdSaturation, hslThresholdLuminance, this->hslThresholdOutput);

click to hide/show revision 2
None

updated 2018-09-20 19:35:57 -0600

berak gravatar image

Bus error when converting colors

I get a bus error from this section of the code. Perhaps there is nothing at the pointer address.

void VisionPipeline::hslThreshold(cv::Mat &input, double hue[], double sat[], double lum[], cv::Mat &out) {
cv::cvtColor(input, out, cv::COLOR_BGR2HLS);
cv::inRange(out, cv::Scalar(hue[0], lum[0], sat[0]), cv::Scalar(hue[1], lum[1], sat[1]), out);
}

}

It is being run by

hslThreshold(hslThresholdInput, hslThresholdHue, hslThresholdSaturation, hslThresholdLuminance, this->hslThresholdOutput);

this->hslThresholdOutput);

Bus error when converting colors

I get a bus error from this section of the code. Perhaps there is nothing at the pointer address.

void VisionPipeline::hslThreshold(cv::Mat &input, double hue[], double sat[], double lum[], cv::Mat &out) {
    cv::cvtColor(input, out, cv::COLOR_BGR2HLS);
    cv::inRange(out, cv::Scalar(hue[0], lum[0], sat[0]), cv::Scalar(hue[1], lum[1], sat[1]), out);
}

It is being run by

hslThreshold(hslThresholdInput, hslThresholdHue, hslThresholdSaturation, hslThresholdLuminance, this->hslThresholdOutput);

Bus error when converting colors

I get a bus error from that I cannot figure out. It crashes in this section of the code. Perhaps there code when it tries to convert the color. It is nothing at the pointer address. in visionpipeline.cpp

void VisionPipeline::hslThreshold(cv::Mat &input, double hue[], double sat[], double lum[], cv::Mat &out) {
    

cv::cvtColor(input, out, cv::COLOR_BGR2HLS); cv::inRange(out, cv::Scalar(hue[0], lum[0], sat[0]), cv::Scalar(hue[1], lum[1], sat[1]), out); }

This is the line where it stops and I get a bus error

It Here is being run bya github link to all the code: https://github.com/isaiahwalton/Jetson-Vision

hslThreshold(hslThresholdInput, hslThresholdHue, hslThresholdSaturation, hslThresholdLuminance, this->hslThresholdOutput);