Feature: Add clean ImageInvert block to OpenCV collection#430
Open
Khushi281300 wants to merge 1 commit intoJdeRobot:masterfrom
Open
Feature: Add clean ImageInvert block to OpenCV collection#430Khushi281300 wants to merge 1 commit intoJdeRobot:masterfrom
Khushi281300 wants to merge 1 commit intoJdeRobot:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Replaces PR #427
Summary
This PR introduces the new ImageInvert block to the OpenCV collection.
Based on the feedback in #427, I have drastically scoped down this Pull Request to contain only the essential files for the block, removing any external engine modifications.
Key Changes
Isolated Block Schema (
ImageInvert.json
): Added the block schema with inputs for Img and Enable.
Natively Supports UUID Wiring: I discovered that my previous synthesis mapping crashes were caused by residual BlurType and Kernel phantom ports left over in the raw JSON schema. I have completely cleaned the JSON structure so that synthesis.py can now map the blocks seamlessly using its default UUID-based wire mapping feature exactly as intended!
Execution Logic: Implemented standard color inversion correctly using cv2.bitwise_not().
Registry Update: Registered the block in
collection-factory.tsx
.
Verification locally
Successfully booted the local VisualCircuit interface.
Created a standard pipeline: Camera -> ImageInvert -> Screen.
Verified that the synthesis engine successfully compiled the connections and outputted a flawlessly inverted stream from the camera.