Update for OPENRNDR segment and path generalizations

This commit is contained in:
Edwin Jakobs
2024-03-19 16:31:45 +01:00
parent 8fe7631570
commit af6d35c59b
37 changed files with 579 additions and 277 deletions

View File

@@ -1,26 +1,26 @@
import org.openrndr.application
import org.openrndr.draw.*
import org.openrndr.extra.runway.*
/**
* This example requires a `runway/BASNet` model to be active in Runway.
*/
fun main() = application {
configure {
width = 331
height = 400
}
program {
val image = loadImage("demo-data/images/life-cover.jpg")
val result: BASNETResult =
runwayQuery("http://localhost:8000/query", BASNETRequest(image.toData()))
val segmentImage = ColorBuffer.fromData(result.image)
extend {
drawer.image(segmentImage, 0.0, 0.0)
}
}
}
//import org.openrndr.application
//import org.openrndr.draw.*
//import org.openrndr.extra.runway.*
//
///**
// * This example requires a `runway/BASNet` model to be active in Runway.
// */
//fun main() = application {
// configure {
// width = 331
// height = 400
// }
//
// program {
// val image = loadImage("demo-data/images/life-cover.jpg")
//
// val result: BASNETResult =
// runwayQuery("http://localhost:8000/query", BASNETRequest(image.toData()))
//
// val segmentImage = ColorBuffer.fromData(result.image)
//
// extend {
// drawer.image(segmentImage, 0.0, 0.0)
// }
// }
//}