You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EdgeDetectionFilter.php 465B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 4/27/16
  6. * Time: 8:16 PM
  7. */
  8. namespace App\Http\Business\Filters;
  9. use App\Http\DBO\EffectApplyDbo;
  10. class EdgeDetectionFilter extends AbstractFilter
  11. {
  12. /**
  13. * @param $data EffectApplyDbo
  14. */
  15. public function apply($data)
  16. {
  17. $edgeArray = array(-1,-1,-1,-1,8,-1,-1,-1,-1);
  18. $data->getImage()->convolveImage($edgeArray);
  19. $data->getImage()->thresholdImage(1);
  20. }
  21. }