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

Add difference tool to configurator #243

Merged
merged 1 commit into from
May 19, 2024
Merged

Add difference tool to configurator #243

merged 1 commit into from
May 19, 2024

Conversation

krzmaz
Copy link
Collaborator

@krzmaz krzmaz commented May 18, 2024

No description provided.

@krzmaz krzmaz force-pushed the difference-tool branch from 3a2c71e to 4a87a7f Compare May 19, 2024 07:55
configurator/src/main.rs Outdated Show resolved Hide resolved
configurator/src/main.rs Outdated Show resolved Hide resolved
configurator/src/main.rs Outdated Show resolved Hide resolved
configurator/src/main.rs Show resolved Hide resolved
configurator/src/cv.rs Show resolved Hide resolved
@krzmaz krzmaz force-pushed the difference-tool branch 2 times, most recently from ae8ffc4 to 5961888 Compare May 19, 2024 15:05
if let Some(output) = &output_dir {
let mut output = output.clone();
output.push("1_base_grayscale.jpg");
Picture::from(base_gray.clone()).save_to_file(output.to_str().unwrap())?;
Copy link
Owner

Choose a reason for hiding this comment

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

nit: to_str()? instead of unwrap?

configurator/src/main.rs Show resolved Hide resolved
@krzmaz krzmaz force-pushed the difference-tool branch from 5961888 to 5d954f5 Compare May 19, 2024 18:27
pub fn save_to_file(&self, filename: &str) -> Result<(), Box<dyn Error>> {
debug!("Writing file: {}", filename);
opencv::imgcodecs::imwrite(filename, &self.inner, &opencv::core::Vector::default())?;
pub fn save_to_file<P: AsRef<Path>>(&self, path: &P) -> Result<(), Box<dyn Error>> {
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
pub fn save_to_file<P: AsRef<Path>>(&self, path: &P) -> Result<(), Box<dyn Error>> {
pub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), Box<dyn Error>> {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

configurator/src/main.rs Show resolved Hide resolved
@krzmaz krzmaz force-pushed the difference-tool branch from 5d954f5 to 7e69db8 Compare May 19, 2024 20:18
@krzmaz krzmaz force-pushed the difference-tool branch from 7e69db8 to 8063b94 Compare May 19, 2024 20:22
@krzmaz krzmaz merged commit 7664dbc into main May 19, 2024
1 check passed
@krzmaz krzmaz deleted the difference-tool branch May 19, 2024 20:26
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.

2 participants