org.cyberlab.activity.local.task
Class CreateUnknownTask
java.lang.Object
org.cyberlab.activity.local.task.AbstractWorkerTask<Bitmap,Unknown>
org.cyberlab.activity.local.task.CreateUnknownTask
public class CreateUnknownTask
- extends AbstractWorkerTask<Bitmap,Unknown>
Creates an Unknown
object from an image. If The extractor used is an SocketLocalFeaturesExtractor
and this fails, the
task will go into degraded mode and use an DeviceLocalFeaturesExtractor
with the image scaled to 300x300 pixels and create the
Unknown object. The image is scaled down for performance reasons.
A different and much better solution is to remove returnResult (the while loop) and threadFinished(int), returning the
Unknown directly from doInBacktround and use the AsyncTask.get() method (see android AsyncTask documentation).
This will return the result from doInBackground.
- Author:
- matsgora, Mats-Gøran Karlsen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateUnknownTask
public CreateUnknownTask(AbstractGeneralActivity<?> activity,
int uniqueID,
LocalFeaturesExtractor extractor)
getUnknown
public Unknown getUnknown()
doInBackground
protected Unknown doInBackground(Bitmap... params)
onPostExecute
protected void onPostExecute(Unknown result)