Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created June 9, 2019 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogermcs/854613c1598f41affd962559268611f1 to your computer and use it in GitHub Desktop.
Save frogermcs/854613c1598f41affd962559268611f1 to your computer and use it in GitHub Desktop.
public class MainActivity extends AppCompatActivity
implements ClassificationFrameProcessor.ClassificationListener {
private CameraView cameraView;
private TextView tvClassification;
private ClassificationFrameProcessor classificationFrameProcessor;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/*...*/
initClassification();
}
private void initClassification() {/*...*/}
@Override
public void onClassifiedFrame(List<ClassificationResult> classificationResults) {
runOnUiThread(() -> tvClassification.setText(ResultsUtils.resultsToStr(classificationResults)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment