Skip to content

Commit

Permalink
Lang entries for filter contours by area
Browse files Browse the repository at this point in the history
  • Loading branch information
serivesmejia committed Nov 5, 2024
1 parent d75a9e9 commit 3b7ec36
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ class PaperVisionEOCVSimPlugin : EOCVSimPlugin() {
* If the plugin comes from a file, we will just use the file classpath, since it's a single fat jar.
* If the plugin comes from Maven, we will use the classpath of all the transitive dependencies.
*/
val fullClasspath = if (pluginSource == PluginSource.FILE) {
context.loader.pluginFile.absolutePath
} else {
classpath.joinToString(File.pathSeparator).trim(File.pathSeparatorChar)
} + File.pathSeparator
val fullClasspath by lazy {
if (pluginSource == PluginSource.FILE) {
context.loader.pluginFile.absolutePath
} else {
classpath.joinToString(File.pathSeparator).trim(File.pathSeparatorChar)
} + File.pathSeparator
}

val paperVisionProjectManager = PaperVisionProjectManager(
fullClasspath, fileSystem, engine, eocvSim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class PipelineStream(
clear()
}

fun isAtOfflineTexture(id: Int) = !isStarted || queue[id] == null

fun textureOf(id: Int) = if(isStarted)
queue[id] ?: offlineTexture
else offlineTexture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,9 @@ class ImageDisplayWindow(
pipelineStream.minimize()
}
}

ImGui.sameLine()

ImGui.text(if(pipelineStream.isAtOfflineTexture(imageDisplay.id)) "Loading pre-visualization..." else "Running OK")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import io.github.deltacv.papervision.node.PaperNode
)
class FilterContoursByAreaNode : DrawNode<FilterContoursByAreaNode.Session>() {


val input = ListAttribute(INPUT, PointsAttribute, "$[att_contours]")

val minArea = IntAttribute(INPUT, "$[att_minarea]")
Expand Down
4 changes: 4 additions & 0 deletions PaperVision/src/main/resources/lang.csv
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ nod_boundingrect,Bounding Rectangles,Rectangulos Delimitantes
nod_boundingrotated_rect,Bounding Rotated Rectangles,Rectangulos Delimitantes Rotados
nod_findcontours,Simple Find Contours,Deteccion de Contornos
nod_groupcontours_byshape,Filter Contours by Shape, Filtrar Contornos por Figura
nod_groupcontours_byarea,Filter Contours by Area,Filtrar Contornos por Area
nod_grouprects_insidearea,Group Rectangles Inside Area,Agrupar Rectangulos Dentro de Area
nod_exporttarget,Export Target,Exportar Objetivo
nod_exporttargets,Export Targets,Exportar Objetivos
Expand Down Expand Up @@ -67,6 +68,8 @@ att_drawon_image,Overlay Input,Entrada para Overlay
att_linecolor,Line Color,Color de Linea
att_linethickness,Line Thickness,Grosor de Linea
att_numbers,Numbers,Numeros
att_minarea,Min Area,Area Minima
att_maxarea,Max Area,Area Maxima
att_result,Result,Resultado
att_shape,Shape,Figura
att_sides,Sides,Lados
Expand All @@ -84,6 +87,7 @@ att_label,Label,Etiqueta
des_exporttargets,Export detected targets to hand to another program.,Exporta objetivos detectados para pasarlos a otro programa.
des_exporttarget,Export detected target to hand to another program.,Exporta el objetivo detectado para pasarlo a otro programa.
des_groupcontours_byshape,Finds contours that match a specific shape.,Encuentra los contornos que encajan<br>en una figura especificada.
des_groupcontours_byarea,Finds contours that have an area within a specified range.,Encuentra los contornos que tienen un área<br>dentro de un rango especificado.
des_grouprects_insidearea,Selects rectangles that are inside a specified area.,Selecciona los rectángulos que están<br>dentro de un área especificada.
des_filterbiggest_rect,Finds the biggest rectangle from a list of rectangles.,Encuentra el rectángulo más grande<br>de una lista de rectángulos.
des_boundingrect,Calculates the bounding rectangles<br>of a given list of points.,Calcula los rectángulos delimitadores<br>de una lista de puntos dada.
Expand Down

0 comments on commit 3b7ec36

Please sign in to comment.