org.cyberlab.local.activity.task
Class CreateUnknownTask

java.lang.Object
  extended by 
      extended by org.cyberlab.local.activity.task.AbstractWorkerTask<Bitmap,Unknown>
          extended by org.cyberlab.local.activity.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

Field Summary
 
Fields inherited from class org.cyberlab.local.activity.task.AbstractWorkerTask
mActivity, threadId
 
Constructor Summary
CreateUnknownTask(AbstractGeneralActivity<?> activity, int uniqueID, LocalFeaturesExtractor extractor)
           
 
Method Summary
protected  Unknown doInBackground(Bitmap... params)
           
 Unknown getUnknown()
           
protected  void onPostExecute(Unknown result)
           
 
Methods inherited from class org.cyberlab.local.activity.task.AbstractWorkerTask
attach, detach, getId, onProgressUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateUnknownTask

public CreateUnknownTask(AbstractGeneralActivity<?> activity,
                         int uniqueID,
                         LocalFeaturesExtractor extractor)
Method Detail

getUnknown

public Unknown getUnknown()

doInBackground

protected Unknown doInBackground(Bitmap... params)

onPostExecute

protected void onPostExecute(Unknown result)