Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[software] New ColorChecker Detection and Correction #973

Merged
merged 35 commits into from
Apr 26, 2021

Conversation

ludchieng
Copy link
Contributor

@ludchieng ludchieng commented Feb 11, 2021

Description

Color checker detection and Color checker corection nodes (beta)

Features list

  • Color chart detection and colors extracting (beta)
  • Color correction (beta)

return pt;
}
};


void detectColorChecker(
std::vector<CCheckerData> &detectedCCheckers,
std::vector<MacbethCCheckerQuad> &detectedCCheckers,
ImageOptions& imgOpt,
CCheckerDetectionSettings &settings)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const CCheckerDetectionSettings &settings

// Load image
image::Image<image::RGBAfColor> img;
image::readImage(imgSrcPath, img, imgOpt.readOptions);
cv::Mat imgBGR = image::imageRGBAToCvMatBGR(img, CV_8UC3);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To convert to 8 bits the image needs to be in sRGB in all case (so it cannot rely on imgOpt.readOptions input parameter).
To read the color values in floating point to compute the color transformation, the image needs to be in the original file format colorspace or in linear (just need to use the same convention where we apply it).

@fabiencastan fabiencastan changed the title Dev/color checker [software] New ColorChecker Detection and Correction Mar 25, 2021

cv::Mat img;
cvtColor(imageBGR, img, cv::COLOR_BGR2RGB);
img.convertTo(img, CV_64F);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to use CV_64F instead of CV_32F?

ludchieng and others added 21 commits April 21, 2021 18:56
add basic printing in log file
[software] colorChecker: rename functions


[software] colorChecker: fix


[software] colorChecker: turbo fix
@fabiencastan fabiencastan added this to the 2.5.0 milestone Apr 26, 2021
@fabiencastan fabiencastan merged commit 68ab70b into alicevision:develop Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants