public class ExternPedestrianComparerUsingAttr extends PedestrianComparerUsingAttr
Request format
16 bytes - Request UUID.
foreach pedestrian (totally 2): {
1 byte - 0: Full data; 1: Feature only (featFlag)
if featFlag: Feature.LENGTH bytes - Known feature.
else: {
4 bytes - Tracklet length (number of bounding boxes).
foreach bounding box: {
16 bytes - Bounding box data (x, y, width, height).
width * height * 3 bytes - Image data.
}
4 bytes - Length of JSON string representing attributes (jsonLen).
jsonLen bytes - UTF-8 JSON string representing attributes.
}
}
Response format
16 bytes - Request UUID.
4 bytes - Similarity.
foreach pedestrian (totally 2): {
1 byte - Whether returning the feature vector (retFlag).
if retFlag: Feature.LENGTH bytes (Optional) - The feature vector of the pedestrian.
}
Modifier and Type | Class and Description |
---|---|
protected class |
ExternPedestrianComparerUsingAttr.RequestMessage
The RequestMessage is a class specializing the format of request messages
of ExternPedestrianComparerWithAttr to extern solvers.
|
Constructor and Description |
---|
ExternPedestrianComparerUsingAttr(java.net.InetAddress solverAddress,
int port)
Constructor of ExternPedestrianComparerWithAttr specifying extern
solver's address and listening port.
|
ExternPedestrianComparerUsingAttr(java.net.InetAddress solverAddress,
int port,
boolean enableFeatureOnly)
Constructor of ExternPedestrianComparerWithAttr specifying extern
solver's address and listening port.
|
Modifier and Type | Method and Description |
---|---|
float |
compare(PedestrianInfo personA,
PedestrianInfo personB)
Compare two pedestrians each given in a track with attributes.
|
public ExternPedestrianComparerUsingAttr(@Nonnull java.net.InetAddress solverAddress, int port) throws java.io.IOException
solverAddress
- the address of the solver.port
- the port the solver is listening to.java.io.IOException
- if an I/O error occurs when creating the socket.public ExternPedestrianComparerUsingAttr(@Nonnull java.net.InetAddress solverAddress, int port, boolean enableFeatureOnly) throws java.io.IOException
solverAddress
- the address of the solver.port
- the port the solver is listening to.enableFeatureOnly
- whether to enable comparing pedestrians with feature only.java.io.IOException
- if an I/O error occurs when creating the socket.public float compare(@Nonnull PedestrianInfo personA, @Nonnull PedestrianInfo personB) throws java.lang.Exception
PedestrianComparerUsingAttr
compare
in class PedestrianComparerUsingAttr
personA
- The first pedestrian.personB
- The second pedestrian.java.io.IOException
java.lang.Exception