Source Code Metode Transformasi Wavelet Haar dengan PHP Reviewed by Unknown dan 17 Orang Lainnya on Rating: 4

Source Code Metode Transformasi Wavelet Haar dengan PHP

Source Code Metode Transformasi Wavelet Haar dengan PHP
Source Code Metode Transformasi Wavelet Haar dengan PHP

Berikut ini Source Code Metode Transformasi Wavelet Haar dengan PHP
<?php
    set_time_limit(0);
    class metodeWaveletHaar{
        public $fid = null;
        public $jenisCitra = null;
        public $imageCari = null;
        public $folder = null;
        public $img = null;
        public $imgX = null;
        public $imgY = null;
        public $pixelCitraRedDiambil = null;
        public $pixelCitraGreenDiambil = null;
        public $pixelCitraBlueDiambil = null;
        public $pixelCitraGrayDiambil = null;
        public $pixelCitraGanjil = null;
        public $pixelCitraGenap = null;
        public $jenisPixelCitraGenap = null;
        public $totalImg = 0;
        public $tampilkanPerhitungan = false;
        public function setFolder($dir){
            return $this->folder = $dir;
        }
        public function openFileOrFolder($dir,$typeImg,$tampil,$jenis,$imageCari){
            $this->jenisCitra = $jenis;
            $this->imageCari = $imageCari;
            $this->tampilkanPerhitungan = $tampil;
            if(empty($typeImg)){
                $this->setFolder($dir);    /*Mendefinisikan Lokasi Folder*/
                foreach(glob($this->folder.'*.*') as $img){
                    $this->img = $dir;
                    $this->ambilPexelCitra($typeImg);
                    $this->totalImg++;
                }
            }else{
                $this->img = $dir;
                $this->ambilPexelCitra($typeImg);
            }
        }
        public function total(){
            return $this->totalImg;    /*Banyaknya Citra pada Folder*/
        }
        public function ambilPexelCitra($typeImg){
            switch($typeImg){
                case "png" : $imgPixel = imagecreatefrompng($this->img); break;
                default : $imgPixel = imagecreatefromjpeg($this->img); break;
            }
            $this->imgX = imagesx($imgPixel);
            $this->imgY = imagesy($imgPixel);
            for($x=0;$x<$this->imgX;$x++){    /*Lebar Citra*/
                for($y=0;$y<$this->imgY;$y++){
                    $index     = imagecolorat($imgPixel, $x, $y);
                    $rgb       = imagecolorsforindex($imgPixel, $index);
                    $pixelCitraRed[] = $rgb['red'];
                    $pixelCitraGreen[] = $rgb['green'];
                    $pixelCitraBlue[] = $rgb['blue'];
                    $pixelCitraGray[]    = round((array_sum($rgb)/3),4);
                }
                $this->pixelCitraGrayDiambil = implode(",",$pixelCitraGray);
            }
        }
        public function tampilPexelCitra($pixelCitraDiambil){
            $pixelBarisCitra = explode(",",$pixelCitraDiambil);
            $p = 0; $n=-1;
            for($i=0;$i<$this->imgY;$i++){
                    $p = $p+$this->imgX;
                    if($i<$this->imgY){
                        for($j=$p;$j<$p+$this->imgX;$j++){
                            $n++;
                            if($this->tampilkanPerhitungan==true){
                                echo "
                                    <td>
                                        {$pixelBarisCitra[$j-$this->imgX]}
                                    </td>
                                ";
                            }
                            if($n%2==0){
                                $this->pixelCitraGenap[] = $pixelBarisCitra[$j-$this->imgX];
                            }else{
                                $this->pixelCitraGanjil[] = $pixelBarisCitra[$j-$this->imgX];
                            }
                        }
                    }
            }
            echo "
                </table>
            ";
            $this->rataRataDanSelisihCitra(implode(",",$this->pixelCitraGanjil),implode(",",$this->pixelCitraGenap),$arahBaris=true,null,null);
        }
        public function rataRataDanSelisihCitra($pixelCitraGanjil,$pixelCitraGenap,$arahBaris,$hasilPixelKolomCitraGanjilselisihCitra,$hasilPixelKolomCitraGenapselisihCitra){
            $pixelBarisGanjilCitra = explode(",",$pixelCitraGanjil);
            $pixelBarisGenapCitra = explode(",",$pixelCitraGenap);
            if($hasilPixelKolomCitraGanjilselisihCitra!=null AND $arahBaris!=true){
                $hasilPixelKolomCitraGanjilselisihCitra = explode(",",$hasilPixelKolomCitraGanjilselisihCitra);
                $hasilPixelKolomCitraGenapselisihCitra = explode(",",$hasilPixelKolomCitraGenapselisihCitra);
                for($i=0;$i<COUNT($hasilPixelKolomCitraGanjilselisihCitra);$i++){
                    $rataRataKolomCitra[] = round(($hasilPixelKolomCitraGanjilselisihCitra[$i]+$hasilPixelKolomCitraGenapselisihCitra[$i])/sqrt(2),4);
                    $selisihKolomCitra[] = round(($hasilPixelKolomCitraGenapselisihCitra[$i]-$hasilPixelKolomCitraGanjilselisihCitra[$i])/sqrt(2),4);
                }
                $rataRataKolomCitra = implode(",",$rataRataKolomCitra);
                $selisihKolomCitra = implode(",",$selisihKolomCitra);
            }
            for($i=0;$i<COUNT($pixelBarisGanjilCitra);$i++){
                $rataRataCitra[] = round(($pixelBarisGanjilCitra[$i]+$pixelBarisGenapCitra[$i])/sqrt(2),4);
                $selisihCitra[] = round(($pixelBarisGenapCitra[$i]-$pixelBarisGanjilCitra[$i])/sqrt(2),4);
            }
            $pixelrataRataCitra = implode(",",$rataRataCitra);
            $pixelSelisihCitra = implode(",",$selisihCitra);
            if($arahBaris==true){
                $this->dekomposisiArahBarisCitra($pixelrataRataCitra,$pixelSelisihCitra);
            }else{
                $this->hasilDekomposisiCitra($pixelrataRataCitra,$pixelSelisihCitra,$rataRataKolomCitra,$selisihKolomCitra);
            }
        }
        public function dekomposisiArahBarisCitra($rataRataCitra,$selisihCitra){
            $rataRataCitra = explode(",",$rataRataCitra);
            $selisihCitra = explode(",",$selisihCitra);
            $p = 0; $setengahBaris = $this->imgX/2;
            for($i=0;$i<$this->imgY;$i++){       
                $p = $p+$setengahBaris;
                if($i<$this->imgY){
                    for($j=$p;$j<$p+$setengahBaris;$j++){
                        $hasilRataRataCitra[] = $rataRataCitra[$j-$setengahBaris];
                    }
                    for($j=$p;$j<$p+$setengahBaris;$j++){
                        $hasilSelisihCitra[] = $selisihCitra[$j-$setengahBaris];
                    }
                }
            }
            $this->dekomposisiCitraArahKolom(implode(",",$hasilRataRataCitra),implode(",",$hasilSelisihCitra));
        }
        public function dekomposisiCitraArahKolom($hasilRataRataCitra,$hasilSelisihCitra){
            $rataRataCitra = explode(",",$hasilRataRataCitra);
            $selisihCitra = explode(",",$hasilSelisihCitra);
            $n = 0; $setengahBaris = $this->imgX/2;
            for($j=0;$j<$setengahBaris;$j+=1){
                if($j<$setengahBaris){
                    for($i=0;$i<COUNT($rataRataCitra);$i+=$setengahBaris){
                            if($n%2==0){
                                $pixelKolomCitraGenap[] = $rataRataCitra[$i+$j];
                                $pixelKolomCitraGenapSelisih[] = $selisihCitra[$i+$j];
                            }else{
                                @$pixelKolomCitraGanjil[] = $rataRataCitra[$i+$j];
                                @$pixelKolomCitraGanjilSelisih[] = $selisihCitra[$i+$j];
                            }
                        $n++;
                    }
                    $hasilPixelKolomCitraGenap = implode(",",$pixelKolomCitraGenap);
                    $hasilPixelKolomCitraGanjil = implode(",",$pixelKolomCitraGanjil);
                   
                    $hasilPixelKolomCitraGenapselisihCitra = implode(",",$pixelKolomCitraGenapSelisih);
                    $hasilPixelKolomCitraGanjilselisihCitra = implode(",",$pixelKolomCitraGanjilSelisih);
                }
            }
        }
        public function hitungEnergiCitra($energiCitra1,$energiCitra2,$energiCitra3,$energiCitra4){
            $ciriCitra1 = 0;
            $ciriCitra2 = 0;
            $ciriCitra3 = 0;
            $ciriCitra4 = 0;
            $pecahEnergi1 = explode(",",$energiCitra1);
            $pecahEnergi2 = explode(",",$energiCitra2);
            $pecahEnergi3 = explode(",",$energiCitra3);
            $pecahEnergi4 = explode(",",$energiCitra4);
            for($i=0;$i<COUNT($pecahEnergi1);$i++){
                $ciriCitra1 = $ciriCitra1+$pecahEnergi1[$i];
                $ciriCitra2 = $ciriCitra2+$pecahEnergi2[$i];
                $ciriCitra3 = $ciriCitra3+$pecahEnergi3[$i];
                $ciriCitra4 = $ciriCitra4+$pecahEnergi4[$i];
            }
        }
    }
?>

37 comments

The wordpress developers for hire is available now where they can use their web programming in a great way. This is amazing program to understand.

Reply

Shahni Digital Media provides complete digital marketing solutions to your business. e.g. ppc, social media marketing, web designing & development. Hire us to grow up your business high.
Digital Marketing Company Bhopal
Website Designing Company Bhopal
SEO Company in Bhopal
ORM Company India

Reply

PHP sources is quite helpful, still it's helps the website to be modernize and some of the companies use templates that are already build to customize the website. I also would have assumed these PHP code to be referring to some domestic site.
Well, there's a lot changed now as like a catchy title attracts readers, but how do you keep them on the page? Use the headings. headings, structure your content and guide readers in the text. For example check this Chiropractic management software article here and you can see how well, structured the new and creative article. Also include fonts size the right font and the right font size can make your content easier to read and visually more interesting, thus increasing engagement. Moreover, bold and italic content makes our blog looks pretty attractive.
One of the great chiropractic websites main specialties in creative and stunning website and they build website without use of any templates. https://optimized360.com/blogs/top-5-things-you-need-on-your-chiropractic-website/ I would strongly recommend that.

Reply

As you grow, you will realize that arguing right and wrong more(so sánh gạch nung và gạch không nung) than losing to others is ( tìm hiểu tam san be tong sieu nhe) sometimes not important anymore. Most importantly, just want peace.

Reply

.I have gone through your blog post, nice blog it’s very helpful and I really thankful for you.
we provide best services in smart classes field in bhopal as well as we provide service like projector sell & Buy,
projector repairing also done by us.
autocad in bhopal
3ds max classes in bhopal
CPCT Coaching in Bhopal
java coaching in bhopal
Autocad classes in bhopal
Catia coaching in bhopal

Reply

Thanks for sharing excellent information.If you Are looking Best smart autocad classes in india,
provide best service for us.
autocad in bhopal
3ds max classes in bhopal
CPCT Coaching in Bhopal
java coaching in bhopal
Autocad classes in bhopal

Reply

I beyond question welcome the way wherein you keep posting such astonishing and significant articles and keep invigorating your blog with latest bearing. Keep up this goliath work. Continue forming.
https://myseokhazana.com/


Reply

Thanks for posting this amazing source code method for transformasi wavelet.
Find here best Free Link Building Sites List

Reply

If you want to improve your business and looking for affordable, professional, reliable SEO, SMO, SEO Company Near me , look nowhere, as our team is capable of providing you sufficient target traffic from the location, where you have potential customers.


SEO Company Near me
Gramblr Alternative
Indian Review Site
Best Night club in Goa

Reply

I really enjoyed your blog Thanks for sharing such an informative post.
https://www.login4ites.com/
https://myseokhazana.com/

Reply


Find trendy technology stock photos in HD and tens of millions of different royalty-loose stock photographs, illustrations and vectors within the Shutterstock series.


Random Email Generator
Black light app
Temp mail
Terrarium TV App
tik tok
ERP software

Reply

Here is a list of the most popular seo group buy tools provider · Flikover · SupremSEO · ToolsZap · Pitorr

Reply

918kiss Malaysia APK Store Download 2021 Available devices: Android and IOS iPhone & Pc Computer. Free Installer and Maintenance Service.

Reply

SEO Malaysia - Suitable for Retail, Lead Generation. Online Education, Gyms, AdWords Partner. Certified GA Partner. Services: Data Segmentation, Statistical Analysis, CRM Methodologies, Dynamic Remarketing, Online Media Buying, Search Engine Marketing.

Reply

Get everything you need for you, friends & family - day & night, active & night wear, party supplies & gifts at the comfort of your home … in short … “Socho aur Lailoo”.
You can also add your desire items by sending message in your wish list if you are unable to find in our store,Our professionals get it for you at the best rates.

Reply

We believe in feminine and graceful outfits. RJ’s is unique for its fresh take on cuts both modern western and traditional eastern with excellent detailing be it evening wear, casual line or Rj’s Exclusive wear.

Reply

Hey, this site was recommended from the site that i just browsed earlier thats why i got curious and so far i am impress of what i`ve seen here. Here`s the goodluck for the progress of your site.Find online thesis helpat affordable price. Thanks

Reply

Thank You for publishing such a wonderfull details.We are also offering offering trainig please read the following detailsof our organization.
TrainingIcon is the most expert and known WordPress Training Institute in Delhi. This Institute has been leading WordPress training institute in Delhi for recent years. TrainingIcon has made various of the understudies and given arrangements into the top IT organizations. After the culmination of WordPress preparing now they are taking care of their responsibilities in the most famous IT firms.

Picking different sources online for amazing web architecture and improvement will lead you towards that load of highlights that you consider in a viable way. With the accessibility of php preparing in delhi for reasonable bundles, it is feasible to investigate a definitive advancement guidelines in a precise design that you anticipate. Different scope of php courses are accessible for the fans on account of which outstanding web architectures could be acknowledged in a genuine style.
PHP Training in Delhi

Reply

Today I was surfing on the internet & found this article I read it & it is really amazing articles on the internet on this topic thanks for sharing such an amazing article.
SEO Company in Bhopal

Reply

Well explained article, loved to read this blog post and bookmarking this blog for future.http://maple.linppt.cc/home.php?mod=space&uid=1922824

Reply

I'm grateful for the opportunity to learn from your expertise through your blog. Color Blindness TestIt helps individuals understand their color perception limitations.

Reply

I'm grateful for the effort you put into researching and presenting this content.I've been using this Best auto clicker to speed up mundane tasks, and it's been a game-changer.

Reply

Your writing style is both eloquent and approachable.This Dice roller online

Reply

I'm constantly in awe of the depth and breadth of your writing.Escape the daily grind with canuckle game and immerse yourself in a relaxing vocabulary challenge.

Reply

Thank you for providing information on the wavelet transformation method and source code! It's a valuable resource for those interested in image processing and signal analysis. Do you have any additional resources or tips for beginners looking to understand the basics of wavelet transformations before diving into the code? Looking forward to more technical insights from your blog!

Epicforce Tech

Reply

Post a Comment