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

Gil - recalibrated colors #37

Merged
merged 3 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static Robot getInstance() {


private Robot() {
this.alliance = Alliance.RED;
this.alliance = Alliance.BLUE;
}

public void setAlliance(Alliance alliance) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.firstinspires.ftc.teamcode.subsystems.vision;

import android.graphics.Canvas;
import android.graphics.Paint;

import org.firstinspires.ftc.robotcore.internal.camera.calibration.CameraCalibration;
import org.firstinspires.ftc.teamcode.Alliance;
import org.firstinspires.ftc.teamcode.PropLocation;
Expand Down Expand Up @@ -81,7 +83,6 @@ public boolean isPropPartOfAvgColor(Scalar color) {

@Override
public void onDrawFrame(Canvas canvas, int onscreenWidth, int onscreenHeight, float scaleBmpPxToCanvasPx, float scaleCanvasDensity, Object userContext) {

}

public PropLocation getLocation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class VisionConstant {

protected static final VisionPortal.StreamFormat STREAM_FORMAT = VisionPortal.StreamFormat.YUY2;

protected static final double BLUE_THRESHOLD = 70;
protected static final double BLUE_THRESHOLD = 60;
protected static final double RED_THRESHOLD = 100;
protected static final double AMOUNT_OF_COLOR = 2.8;

protected static final Rect RED_RIGHT_ZONE = new Rect(400, 400, 100, 80);
protected static final Rect RED_CENTER_ZONE = new Rect(20, 330, 80, 150);
protected static final Rect BLUE_RIGHT_ZONE = new Rect(400, 400, 100, 80);
protected static final Rect BLUE_CENTER_ZONE = new Rect(20, 330, 80, 150);
protected static final Rect RED_RIGHT_ZONE = new Rect(380, 400, 150, 80);
protected static final Rect RED_CENTER_ZONE = new Rect(30, 370, 100, 110);
protected static final Rect BLUE_RIGHT_ZONE = new Rect(380, 400, 150, 80);
protected static final Rect BLUE_CENTER_ZONE = new Rect(30, 370, 100, 110);

protected static final Size BLUR_SIZE = new Size(5, 5);

Expand Down
Loading